Skip to main content

Posts

Showing posts with the label Validations

Interactive Grid - Client Side Aggregate Validations

In my previous blog post Interactive Grid - Aggregate Validations , I have explained how we can do "Aggregate Validations" for Interactive Grid (IG) data using server side validations. Server side validations technique is useful for complex validations that may involve checking data from multiple tables or number of rows in IG are more than 50 etc. However, for simple validations, like the one defined in my previous blog post, we can achieve it using Java Script (JS) APIs available for IG, entirely on client side. Let's consider the same example again. Budget planning, where you can allocate percentage for each category, like 10% for healthcare, 10% for education etc. Here, we need to implement a simple table level validation to ensure total allocation % does not exceed 100. To start with, create IG region on BLOG_BUDGET_PLANNING table and enable edit mode. Assume BLOG_BUDGET_PLANNING columns as PLAN_ID, PLAN_CATEGORY, PLAN_PERCENTAGE and Audit (Who) columns In I...

Interactive Grid - Aggregate Validations

In Oracle APEX, validating Interactive Grid (IG) data at row level, is easy and straight forward. You just need to select "Editable Region" for the validation and then you can use IG column values using :COLUMN_NAME syntax in SQL and PL/SQL code. However, if you want to create a validation at table level or validation which uses multiple rows data, then it becomes tricky. Let's consider a simple example of budget planning, where you can allocate percentage for each category, like 10% for healthcare, 10% for education etc. Here, we need to implement a simple table level validation to ensure total allocation % does not exceed 100. Please refer  Interactive Grid - Client Side Aggregate Validations  for implementing this validation entirely on client side. You can use technique explained below for more complex validations that can't be done on client side (checking data from multiple tables, number of rows in IG are more than 50) Before jumping into the implemen...

Oracle APEX Detect multiple browser tabs

One complaint I often hear about APEX applications is, issues users may face when they open application in multiple browser tabs/windows. Some pages which contains only reports or dash board pages may work fine even when opened in multiple tabs/windows. However, some pages may have issues like wrongly updating session states, seeing mixed data from two separate records or worst case wrong data being updated to DB. General advise I give to users is, please use different browsers, if you want to open same application/page in two tabs . But, can we somehow detect that user has opened more than one tab and show the message directly from the application itself? And the answer is, Yes, we can and here is the link to demo . If you want to implement this technique in your APEX application or page, all you need to do is Download noMulTabs.js  and add this JS file to your APEX application. If you are not sure what is the best way to do it, you can refer  Adding JavaScript to a...