how to fill another text item - oracle

I am very new in oracle forms so my mind is very very confused. I have 2 text items in the begining and at the end of the form i have multi text item like grid view. When i push the button the system should get and add the information to the grid view but my programme is working like that. it gets the information and add the information in the first place of the grid view, when i add second information it deletes the first row and add it in the first place. it should keep the last situation.

If for example BLOCK_NAME is your multi text item, TEXT_ITEM1 is your first text item and TEXT_ITEM2 is your second text item, you can write the following code in when-button_pressed:
go_block('BLOCK_NAME');
first_record;
:BLOCK_NAME.COLUMN1 := :TEXT_ITEM1 + :BLOCK_NAME.COLUMN1;
last_record;
:BLOCK_NAME.COLUMN1 := :TEXT_ITEM2 + :BLOCK_NAME.COLUMN1;
commit;

good for two items only
if the items are more then 2 then better user these command with in loop
and use next_record instead of last record
and check for :system.last_record true
if true then exit
else
continue working

Related

How can I automatically make new tag in Mit App inventor when I want to add new items to TinyDB

I have max limit of 3 items I can add in database, and I can add the items in DB whenever I want to.
How can I make it so when I have for example already 1 item in database and I want to add another one, it makes a new tag automatically?
code blocks
For now I was trying to make a simple if statements to check if there is something under that tag, but it doesn't seem to be working.
The correct logic for the checkDB procedure would be
if not is text empty ...
then ...
you can find the not block in the Logic drawer and the is text empty block in the Text drawer
also the text in the socket valueIfTagNotThere should be an empty string

Add notes & footnotes to table

I have a report where I need to add a note/number where a record has data in a particular column. I then need to add a reference to that to the bottom of the table, much like a footnotes section you would see in a book.
I've tried adding the rownumber but it pulls in the actual rownumber and not the record count. I'm using oracle for my db.
In my report, if the record has a value for the column RETURN_NOTE (not shown), then concatenate an int tot he end of the TASK_NAME column. Then underneath the table, add the int from above with the RETURN_NOTE value.
You can see the red numbers and their description in the image below.
Thanks
The best way to go here is when you add a calculated field to your dataset where you put your footnotes into the expression. Lets assume your footnotes depend on the Fields!Task.Value and lets call this calculated field Footnotes:
'Name: Footnotes
=Switch(Fields!Task.Value = "Prepare for Coordinator", 1, Fields!Task.Value = "Ready for Closeout", 2)
Now add another column to your tablix and put the field Fields!Footnotes.Value in this column.
Then add a rectangle or another tablix somewhere in your report (put in the values which explains the footnotes). Then go to the properties of this tablix/rectangle (pane on the right) and under Other > Bookmark write in a bookmark code (for example: FootnotesExplained).
Go back to your textbox with the Fields!Footnotes.Value in it and right click on this textbox and go to Text Box Properties > Action and check the Go to bookmark option and write below your bookmark code from before FootnotesExplained.
When you click now on one of the value in the column where the footnotes are the report will jump to the tablix/rectangle where your footnotes descriptions are.

How to click on Web Table column's Web Button in following case?

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.

Oracle Forms Builder: Cannot Execute Query

I am using this code fragment:
BEGIN
GO_BLOCK('COMPANY_PRODUCTS');
EXECUTE_QUERY;
END;
in WHEN-NEW-FORM-INSTANCE of my form module.
I also changed the text items of my data block into display items.
The problem is that when I start running my form module, it displays an error stating:
FRM-40106: No navigable items in destination block.
It doesn't have "Enabled" and "Keyboard Navigable" property.
The reason I changed it to display items is because I don't want the user to click and edit the text on the item.
Is there any way can I get through this problem? or should I just stick with text items?
Screenshot: Form Module on Web Browser
make your destination block's all item Display Item, except leave one of them as Text Item ( preferably the first one in the physical sequence of items [topmost or leftmost]). And then, set that text item's Update Allowed and Insert Allowed property to No from Database section of Property Palette.

Suppress Duplicate Rows only in the Same Page

I am using Suppress Duplicate function to prevent the same item code to be displayed more than once.
I have just one question:
Is it possible to hide the duplicates only in the same page?
For example, Item Code "1111" is displayed in Page-1, no duplication is shown under it. But in case "1111" has a long list in other columns and continues to Page-2, is it possible to display the item code in the first row of Page-2 and then suppressed again? So if it has an even longer list and extends to Page-3, the item code can be displayed again in the top row?
You could add a group by on the item code and place the information about in the group header. That way there are no duplicates, but you have the option to repeat the header with information on each new page.
Thank you for the comment.
It is already grouped by the item code. But I cannot use the table header to display the code because one item code is not always repeated. So one page might have 2 item codes only, but the next page might have 50 different codes. In the latter case, using the table header can be tricky(probably need to iterate the table for 50 times?). Also it is tricky because my report layout has to be consistent with the excel layout sample prepared by my client.
Thank you for your input anyway.

Resources