we have a requirement to manually populate editable IG with data from another table when user press a button to fill rows.
IG is based on a table and a where clause is used but initially when appear the grid is empty, user will press a button and through a process / procedure / fuction / dynamic action this IG should be populated. please help how it can be achieved.
create a button with the action defined by dynamic action and create a duplicate IG region with data populated.
When this button is pressed, hide the empty Ig region and show the populated one.
Related
I have a form that has five fields and an interactive grid. After I click "Send", I created a process to send an email to the requester, and in this process, I can send the information that is filled in each field of the form, using the APEX variables &P10_FIELDNAME.
My question is: how do I send the information that is passed in the interactive grid?
Remembering that: this interactive grid is only for INSERT. That is, the grid will always be empty when filling out the form.
My form
It is possible to create a page process to pick up the data from an interactive grid in pl/sql as shown in this screenshot: it is a basic interactive grid on the EMP sample table:
This process is being executed for every updated/inserted row of the grid, the "editable" region needs to be set to the IG region, the individual columns can be reference with the bind variable syntax (column ENAME can be referenced as :ENAME).
There are many blogs on this, for example here and here (I just picked those 2 at random)
Now to answer your question specifically, you'll have to go through a number of steps to send this data, together with other page data in an email, just because the pl/sql code in this process is executed in every row. What you could do is
In the IG custom process, add the data to a collection (using the APEX_COLLECTION api.
In a page process that executes after this IG custom process, loop through the collection with the IG data to populate the email and include the other page items as well
I created a report and a form separately rather than creating a "report with form" in my Oracle Apex application. Because of this there are no update buttons that appear on the left of every row in the report like it does when creating "report with form". How can I add these buttons such that I can use same form, which I am currently using just to create new records, to also update records?
I am assuming the report is in Interactive Report type.
Those are the ones which are normally created for report with form.
In which case if you go under the reports attributes the first one is Link,
by default it should be set to Exclude Link column. You should set it to Link to Custom Target, then define the link to go to your page and set the Primary key item.
And on your form page you also need to set an After Header process to fetch the row and fill the page items based on the filled Primary key. Or you can do something custom here, whatever floats your boat.
I am setting up a report on a page with multiple checkbox page items and start and end date page items. The user clicks a 'Run Report' button to generate a report region below on the page.
The default selections for the checkbox items are all items selected, and the Start and End Date items have default options based SQL queries.
I want to the report region to hide on the initial page load, and then show once the user clicks 'Run Report'. I tried the following solutions:
Set region condition to 'Never' and then use a dynamic action to show the region once the button is clicked. However, I think the 'Never' condition trumps the dynamic action.
Create two dynamic actions, one on page load to hide the region and on clicking the button to show the region. However, the show DA is always overwritten once the page loads again because of the first hide dynamic action, so the region never displays.
Has anyone else run into this problem? Any solutions? Thank you!
You may like to consider the 'lazy loading' described on Maxime's blog.
https://askmax.blog/2018/05/18/lazy-loading-report/
Like you said, a server side condition will trump and DAs that are showing/hiding on the browser, as the region would never render.
If you want to hide something on entry, you can do something similar to what you described, but I'm not quite sure what you've done.
on load dynamic action to hide region (or add
style="display:none;" to custom attributes of region.)
on click of your button, show the region (do not run on initialisation), and
refresh the region.
I've been designing a new app in ApEx 19.1 and one of the form/reports which I have created will not save a specific column when I click CREATE (SQL Insert action). Debug data shows that the data is in the session state when the CREATE request is being processed. I have verified that the value is not inserted with the other columns by querying the table in SQL Developer.
When I click to edit the item, the page item is blank and the value is not in the session state. I can then choose a value, and it saves correctly (SQL Update action).
I have several other 19.1 form/reports in the app which do not have this problem.
Details:
-ApEx 19.1
-Modal Form page on an Interactive Report
-New Form Region, not legacy DML setup
-DATETIME column type, Date Picker item type
-Required column, Value Required = Yes (and errors occur correctly if left blank)
-The biggest difference between this page and others is that rather than navigating directly from the report page to this form dialog on Create, there is a different modal dialog form that must be filled, and then the user navigates to the form in question.
All of the other fields insert data correctly to their corresponding columns, and I haven't changed any of the Source settings after creation, so I'm not sure what is causing the issue. I've even deleted the pages and rebuilt them with the same results.
The issue had nothing to do with ApEx, and everything to do with poor DB & app design.
There was an insert trigger on the table which inserted a value to the column in question from an application item which had not been set.
I'll definitely clear that up to avoid future confusion.
I have three regions named Order Taken, Order Process and order Completed. Each of the regions are based on Interactive Grid and each regions set to on as region display selector.
Now, when I updated order-status of 481 order-no to taken-order-status(0) in order process region, then i want to show the changes occur in taken-order region.
More simply, I just wants refreshed data every-time only when i changes/switches region or changes region display selector.
Probably the easiest way would be to hide the Save buttons on the individual Interactive Grids (IGs) and instead have a page button called Save that submits the page. This will cause all IGs to be processed and the page to be reloaded, so all IGs will be up to date.
Have you tried adding dynamic actions on region display selector? You can refresh the region when that region is clicked on the region display selector.
Create a dynamic action on region display sector - on click event on the region. One dynamic action for each region.
Create a refresh action under true. and select the same region to refreshed as one clicked.
Does that help your case?
Put the below code in the Function and Global Variable Decleration Section
$('.apex-rds').data('onRegionChange', function(mode,activeTab) {
if ((activeTab.href === "#REGION_STATIC_ID")){
apex.region(activeTab.href.replace("#","")).refresh();
}
});
NOTE: Replace REGION_STATIC_ID with the static id of your region.