I have a page where the users will be adding items to their list. In here, they have an 'add row' button which - just like the name - it adds a new row for the user to include another item.
In order to make a new row visible I have:
A display only item (which will become hidden later on) that gets increased by one when the user clicks on the 'add row' button (counter original value when the user first enter the page = 1)
Rows with a server side condition (row 2 will be shown if the counter is greater than 1...row 2 will be shown if the counter is greater than 3 and so on)
Sometimes it works perfectly....most of the times it doesn't.
Pic 1:
Counter now equals 2 (I clicked the add row button once which converted it from 1 to 2) and in theory row number 2 should be displayed now...but it isn't. Only the first one it's being shown:
Second row server side condition is:
:ROW_COUNTER > 1
Does anybody know how to fix this?
Thanks!
Im just gonna guess here and say that it shouldnt be working because you use server side condition for a dynamic change.
Server side conditions only trigger on page initialization and not when you change something dynamically by pressing a button. This should mean that your conditions wont be met until you either refresh or submit the page, depending on your ROW_COUNTER session settings.
--> https://www.foxinfotech.in/2020/02/oracle-apex-using-server-side-conditions.html
Try working with a Dynamic Action. You can execute PLSQL code there too.
Related
I have a very simple Oracle Apex app. I created a button on the home page. I also created a second page using the "Form" template, and the source for this form is a table in the local database.
I set the button to open the form, and I passed the value of the primary key of this form (it's a column called ID) from the home page to the form page, as this screenshot of the button's behavior shows (3 is the page number of the form, P3_ID is the page item in the form associated with the primary column "ID", and 1 is the value that I passed for P3_ID):
The table that the form references is empty, i.e. there is no row with ID equal to 1. Meaning I want to pass the value of 1 to this form so that it automatically create a row with ID of 1 after the user fills out the rest of the form. Here is the form page:
Now the error. When I run the app and press the button, I get this error:
The error says it's from the process called "Initialize form Warcraft Particulars". I searched everywhere and I couldn't find a process by that name anywhere in the app. What am I doing wrong?
Pre-rendering process (in a form) will try to execute query and fetch a row whose ID = 1; as it doesn't exist, Apex raises the no_data_found error. That's why you got it (the error).
Moreover, you're doing it wrong - don't pass ID you'd want to create, fill it in form's process (or use a database trigger which will put a sequence number into the ID column, or use an identity column if your Oracle database supports it (12c onward)).
Furthermore, I'd suggest a slightly different approach: don't create a form that's alone in the Universe. Approach that lets you both view existing data, update (or delete) it and insert new rows is to use a Wizard and choose a report with a form. Exact naming is different from one Apex version to another; for example, current apex.oracle.com Apex version is 22.2 and it offers "Interactive report", while the 1st Wizard page lets you choose whether you want (or not) to include a form page (you'd say "Yes").
Anyway: once you find the correct option, choose it and wizard will then create an interactive report page you'd use to
view current data
it has an edit icon at the beginning of each row which - when pressed - navigates to the form page where you can edit values or delete entire row
create new row (by pressing the "Create" button)
and a form page which does what I described a moment ago.
I have a wizard and i am trying to pass a value from one page to the next onclick a next button on the wizard in oracle apex but when i click next the value is not going through to the other side.
enter image description here
Image above shows the next button and the how i am trying to pass the value
thanks
What you did is this:
there's page 33
there are (at least) two items on that page
P33_ID
P33_NEW
you are passing P33_NEW item's value into P33_ID item
in other words, you're doing it on the same page, while it seems - according to what you said ("I am trying to pass a value from one page to the next") - that you're expecting something to happen on some other page
If that's so, transfer P33_NEW item value to "some other page", not page 33.
If you still want to do it on the same page, consider using a Set value dynamic action.
I have one web table, in this I want to delete particular record by clicking on record's delete button.
I got the value of row but I am not able to perform click on web button of particular row and also there is 2 buttons in one column.
How to click on delete icon of particular row?
You need to set a reference to the item within the specific row and then click on it - something like this:
Set oLink = Browser("myBrowser").Page("myPage").WebTable("myTable").ChildItem(iRow,8,"Link",0)
oLink.Click
You will potentially need to amend the "Link" and the number 8 in your own code. iRow represents the row you are trying to interact with.
Essentially what this code does is set an object reference to the first item of type "Link", in column 8 of the table, then uses a Click event to select it. If your delete icon is a WebButton, then replace "Link" with "WebButton" for example. The final 0 in the command tells UFT to select the first element matching the object type - you might need 1 if your two icons are in the same column of the table.
Let me know if that helped.
I have an apex page that has some search items filled by the user. One of these items is a check-box with 4 values used to search. For example, 4 check-boxes(but only 1 item) with the values A:B:C:D. I have 4 reports(one for each check-box value), that must be showed only in case of the corresponding check-box is marked. So, I put a SQL condition in each report, ex: for report 1, condition => :P324_MY_CHECKBOX like '%A%', for report 2, condition => :P324_MY_CHECKBOX like '%B%' ...
When user fill the form, he clicks on "Search" button that invokes a dynamic action. This DA sets the items on the session and refresh the 4 reports. The expected result would be to show only some regions, according to the selected check-boxes. The problem is that the condition doesn't work in this case of refresh. I can see in the apex session that the item P324_MY_CHECKBOX doesn't has the value "A" for example but the corresponding report is still showed.
Resuming, the condition of region doesn't work(is not re-evaluated) if I refresh the region in a Dynamic Action.
Has anyone had this kind of problem? Is there an expert or guru to help me?
Thank you for your attention!
Conditions are evaluated on render of the page while dynamic actions are javascript commands that operate on the rendered page.
Instead show all regions without conditions and control the hide/show using your dynamic action.
In MVC-3/Razor, I need to create a page which will have five set of controls. Each set will have a drop-down and a text box. User will select an option from drop-down and then provide some feedback on text box.
When the view is shown very first time, I only have to enable controls in first set. Whereas all controls in 4 other sets should be disabled. Once user perform action in first set of controls (select optino from drop-down and enter in text box), the second set should become enable now, whereas other set of controls should still be disbaled. The data shown in this second drop-down is dependent upon what user has selected in first drop-down. Once user complete action in this second set, the data in third drop-down will depend upon whatever user selected in first and second drop-down etc.
I am a web-form aspx developer and not sure what will be the best way of designing this in MVC-razor world (because there is not view state etc).
Step 1)
What needs to be clarified is what will cause the other “sets” to be enabled?
Is it after the user has selected an item in the dropdown
OR
Is it after they have entered some text in the textbox?
What also needs to be clarified is if you have a dropdown AND a textbox are they both enabled at the same time or is the textbox only enabled after you’ve selected an item in the dropdown?
Once you’ve got that figured out, move on to the next step.
Step 2)
Do the users need to visually see the 4 sets from the beginning (disabling the 3 other sets) or can you simply show the other sets (on the fly) once the previous one has been successfully filled?
Depending on the answers, this may vary your approach.
As for me, the way I’d do it is simply have/show one set that loads at the beginning.
Once the user has selected an item from the dropdown, I would make an AJAX call passing along the selected item and get back a list of values for the second dropdown.
Then, using jQuery, I would duplicate the row (or div) of the first set all while changing the values in the second dropdown box.
Repeat process for when an item is selected in the second dropdown.
But wait! There’s more!!!
Let’s assume you’ve reached the third set. What if the user decides to change the value in the first dropdown? What are your requirements if that happens? Should you remove all other sets and start back at square one? I guess so…
Since we are not aware of the full set of specs for your tasks, we can only assume stuff and this may (or not) be the best path to take.
Duplicating a row (or a div) using jQuery is quite fun and performance wise, it’s nice.
Keep in mind, you will have to give a different ID to your controls (dropdown + textbox) so when you submit the form, you could use the FormCollection to get those dynamically generated controls.