how to add one more data block item in oracle forms [duplicate] - oracle

In the below given example like rejection date it has total 5 rows of same type.
when i tried to create new data block item like issue date(issue date is table column) I'm getting only one row (I want to get 5 rows as shown below.)

Forms does that itself, but you have to add that new item into that block. Because, it is
block's Number of records displayed property
item's Number if items displayed property
that affect number of "rows" you'll see.
For example, if block's number of records displayed is set to 5 (as it apparently is) and you add a new item to that block and set appropriate canvas, Forms will create 5 instances of that item. You can then choose not to display all of them but any number between 0 and 5 (where "0" also means "all of them" (5 in this case)).

Related

Robot Framework how to use FOR loop for a specific column in a table

I want to know how to use a FOR loop for a specific column in a table.
Basically. I want to get the text in the third column and equate / verify it to be "LOCAL" for all rows. I will provide a basic diagram of the table
So, in the diagram the checkboxes take up as first table cell and the top row is a table header.
What i want is to get the text of all the cells under column /th4 and equate it to be as "LOCAL" as said before. There might be multiple entries and will be dynamic. So, that is why i want to use FOR loop.
PS: every cell under /th4 is LOCAL , so just want to equate the text.
My code:
Click Element xpath=//*[#id="selectType"]/div/div[2]/ul[2]/li/div
Sleep 0.1
Click Element class=dropdown-btn
Sleep 0.1
Click Button id=filterBtn
Sleep 0.1
Click Element id=closeFilter
Table Row Should Contain xpath=//*[#id="myTable"]/tbody/tr[1]/td[4]/span 1 LOCAL
Table Row Should Contain xpath=//*[#id="myTable"]/tbody/tr[2]/td[4]/span 2 LOCAL
Table Row Should Contain xpath=//*[#id="myTable"]/tbody/tr[3]/td[4]/span 3 LOCAL
Basically, there is filter option... once i filter, the fourth /td in the table will all contain text "LOCAL".
Instead of me manually typing "table row should contain" keyword, i want to for loop it to verify all the cells in that column
Let me know if any other information is required.
Thanks and Regards,
Sandesh K S
For loop is not the best option here because you usually need to know beforehand how many elements you have and you mention that number of rows can change. It would be better to use while loop:
${row}= Set Variable 1
WHILE True
${elements}= xpath=//*[#id="myTable"]/tbody/tr[${row}]/td[4]/span
${num_elements}= Get Length ${elements}
IF '${elements}' == '0'
BREAK
END
Table Row Should Contain xpath=//*[#id="myTable"]/tbody/tr[${row}]/td[4]/span 1 LOCAL
${row}= Evaluate ${row} + 1
END

how set to data block property pallet in oracle forms to save data to table in oracle forms

I have two data blocks with two tables(with fields on forms).
How to save records of one table(column values of table one) to second table by setting property pallet.
I have tried by giving where conditions in data block 2 property pallet but it is not saving records to table two
by setting property pallet
Looks like you want to use the 1st block's values in the 2nd block. To do that - using the Property Palette - navigate to any block 2 item and check Data set of properties, especially
copy value from item
synchronize with item
When you're on that particular property, press F1 on the keyboard to read what they do, and then pick the one you find the most appropriate.
You'll have to set that property for every block 2 item, of course - one by one.

How to update a field when another is modified

I have three fields
1. Price (:P7_PRIJS)
2. Quantity (:P7_HOEVEELHEID)
3. Total (:P7_TOTAAL).
I want the total to be updated (price * quantity) the moment the quantity is changed. All items are on the same region, from the same table.
I have already created a trigger to update the total, this works, but is not visible in the screen.
I have tried with a Dynamic action, but get errors when doing so.
I just want to see in the form, before saving the updated total. How can this be done?
Dynamic action is a way to do that. Actually, you need two of them (which will look exactly the same), each of them created on P7_PRIJS and P7_HOEVEELHEID items (so that total gets calculated regardless of which item value you've changed).
Dynamic action's action is Set value:
set type: PL/SQL expression
PL/SQL expression: :P7_PRIJS * :P7_HOEVEELHEID
items to submit: P7_PRIJS,P7_HOEVEELHEID
affected elements: item, P7_TOTAAL

Using Views to add number of forms together

I am creating a database for software product keys at work which means having to document every product key in notes. I want to be able to say in a column how many of these product keys are assigned and how many are not. I have assigned a basic binary value to every form which can either make it assigned or not and leads to give the form a structure such as this ( the keys are false obviously)
I want to add a line next to Office 2013 that says XX Assigned, XX Unassigned for instance and I want this to work across every possible product I add to the database. Any ideas?
I am not sure that it is possible exactly as you wanted.
After "Assigned" column add a column, with 1 set as the column value (look at the picture below).
Open the second tab of the created column and set "Totals" to "Total" and check "Hide detail rows".
In this case just after "Assigned" column there will be a column with number of entries, which belong to this category.

Dynamically update a number field by summing the values of the other number fields on the same page

I've been struggling to dynamically update a number field in my Apex application with the sum of values from the other number fields on the same page. The page contains a questionnaire with 6 questions that have predefined answers, along with a predefined number score for each answer. At the bottom of the page I have a number field labeled "Score" that I want to be updated depending on the answers chosen.
I've went ahead and created a dynamic action that is supposed to update a number field named P3_SCORE.
The example I've been trying to get to work adds two of the items at the moment, number field item P3_SELFCARE and P3_MOBILITY.
BEGIN
return :P3_SELFCARE + P3_MOBILITY;
END;
I keep getting errors with my PL/SQL Function Body.
Don't know what the errors you're getting are, but don't you want
BEGIN
return :P3_SELFCARE + :P3_MOBILITY;
END;

Resources