Oracle Apex Execution of Page Process - oracle

I Created the tabular form with two page process. i am in need to execute the first page process for created and modified rows and second page process need to executed only once.
how do i achieve this functionality
Thanks & Regards,
Priya

The is no inbuilt way, you would need to code something. For the Process to run only once create a hidden field, set it to one the first time the process to run and have this Process only run when the hidden field is 0.
The Process for Edit and Create should only be triggered when the Create/Edit buttons are run. You can have triggers for this in Apex. Look at the Conditions dropdown, select Request when Request is the name of the Submit button (e.g edit or add)

Related

Oracle Apex 5.1 Interactive grid save issue

I have an interactive grid that intermittently fails to save changed data properly.
I have a changed the default save process into a PL/SQL process to allow me to do some lookups before the data is saved back to the table. I have some PL/SQL logging in the save procedure, so I can see when the process starts & ends and what a number of the variable values are.
This process works fine, most of the time. However every now and again 1 in 20 or so, the process fires but I can see that one of the new values is actually the old value, so the update works with the wrong data. I can not see any pattern to how I'm updating the cell when it doesn't work.
I have created a button with a dynamic action to Submit the page on button click, which fires the update whenever a change is made. I also have a branch on the button at "After Processing".
I'm not sure the branch is relevant as I can see that the save procedure fires before it's redirected, but sometimes without using the updated values.
Any ideas or suggestions on how to track down my issue?
Cheers
Pav
The debug didn't show anything. However I believe I found the cause.
The page had some javascript lifted from the IG Cookbook to calculate a column total.
When I removed one command it stopped the issue. I also tracked the issue to a model change that wasn't saved, then navigated off page and then back. Then the first changed made and saved would save original value and not the changed value.
Code removed was:
// just in case fetch all the data. Model notifications will
// cause calls to update so nothing to do in the callback function.
// can remove if data will always be less than 50 records
model.fetchAll(function() {});
Cheers
Pav

Why is my Oracle APEX DML Form stuck in edit mode and not going back to create mode?

I have created a page based on "Form & Report" template. So there is the Report page on which there is the create button. That create button leads to the form page which contains.
It is pretty simple. I don't know if there is a cache memory not emptying itself or if there is a setting that I have not properly set.
When I want to create a new database record, Oracle Apex behaves as if I asked it to update a record (though it still presents me with empty text fields).
Below the image of what's happening.
Create button of the Report
Buttons for edit are shown when I click the create button
Those edit buttons are shown instead of the buttons below => This means that the Apex software is behaving like I asked to edit a record not to insert a record.
Why is this happening?
You need to take a look at your create button. Is it passing a value to the form? If so, you probably don't want that. Is it clearing the cache of the form? If not, you probably want to clear it.
Also, on the form page take a look at your processes.. specifically the Automated Row Fetch (ARF) process.. what's the primary key that this process is using?
Also, take a look at the conditions for each button on your form. For the delete/save buttons you likely want a condition type of "value of item / column in expression 1 Is NOT NULL".
For your create button you would want the opposite.. "value of item /... IS NULL".
In both cases for the expression 1 you'd want to use the item that your ARF is leveraging.
#Bloomberg58 if you used the wizard that should not have anyway try to validate the create button in report page and the server-side validation of create and save button in form page

Creation of Multiple Actions on Onclick APEX

I am working in Oracle APEX .i want to create multiple actions onclick on one button.I want to insert the Table values and also want to redirect page in the same data base.
Regards,
If the button is submitting the page then you can create any number of processes, calculations, validations and branches that can be run conditionally for that specific button.
Your table insert would be a Process and your redirect will be a Branch.

Calling a child dialog and passing in input parameters

I've read a bunch of articles on how to call dialogs from javascript and integrate them into a ribbon button, but I am running into a problem where I need to do all that AND pass in a string as an input parameter (to a child dialog?).
Is this possible? Would I have to modify the calling url of the dialog?
I've read this one about calling dialogs with the SelectedControlAllItemsId, which is almost what I need.
Ideally I would open the form of the parent entity, click on one of the subgrids in the left hand navigation, then select some of the related/associated entities, click the ribbon button and wait for the dialog or workflow to chew through all of those Ids.
Is it possible to capture these selected items using SelectedControlAllItemsId, then pass that string to a child dialog so it can then call another workflow? Or should I capture that string, store it in the calling record via REST and then let a workflow run on a field-trigger?
The end result is that I must run a custom workflow and manipulate the parent record + the selected related records. I have already written the workflow, but I do not know how to trigger it the way I want.
Perhaps there is something I am overlooking? Is there a way to call a custom bit of code directly from javascript and let it work the rest of the way?
I'm not sure how an interactive dialog should deal with a collection of records. Surely that would require sequential iterations of the dialog, as the user processes each record? As you will see from the SDK (and discussed in your linked thread), it is only possible to run a dialog against a single record.
A workflow is a different matter.
- Custom ribbon button, using SelectedControlAllItemsId
- Supporting JScript handler should iterate SelectedControlAllItemsId
- Each iteration should issue an ExecuteWorkflowRequest using the current item id and based on code such as this (which issues an ExecuteWorkflowRequest from JScript
Remember that the workflow request is asynchronous so you can just send all the requests one after another rather than waiting for the outcome of each request.

Execute Oracle Apex Process from HTML link

I have some custom HTML that creates a table on my page with a bunch of images. For each image I would like to create a tag around it and call a process that has been defined in apex. How can I do this?
It seems that the only way to call processes is from a object that has been created by Oracle Apex such as a button item....
Two ways:
1) You can set up your link to submit the page with a request like this:
...
Then create a page process that runs when Request is equal to 'MYREQUEST'.
2) You can give your anchor an ID:
...
Then create a Dynamic Action that fires on the Click event for the jQuery selector '#myAnchor' and executes PL/SQL code.
Don't think you need the doSubmit Javascript function because if you go to the
report >> edit the column >> column link,
there is a Request field. You can put your request name there.
In page process condition type pick Request = Expression and put whatever you named the request.
I find javascript more flexible. For example you can implement confirmation dialog with customized text message like followings:
SELECT col1,
'submit' as link
FROM tab1
Regards,
Igor

Resources