Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Dynamically Changing Labels for Multi Row Block Buttons

libranAug 30 2011 — edited Oct 29 2013
Forms [32 Bit] Version 9.0.4.1.0 (Production)
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production

On my local: Windows 7 OS

I am having a difficult time in doing the following in forms, and not sure if it can be done?

I have a multi row block,based on DB table, which displays filename and another column from the table.
It also has a push button on each row, which opens and displays the physical file from its source, when clicked. The filename thus can have 3 diff statuses depending on its sources and accordingly corresponding button should display appropriate label:

a) View Image (its is in content server and successfully imaged. In this case I display the file in the browser, from the content server, when the button is clicked)

b) View File (Display the file from file system)

c) View Error (Display imaging error message from the table, as file failed to make it to the imaging server)

I have this logic currently coded in the post query trigger, at the block level, and tried using set_item_property(button_id, label, <button_lable>), where I programmatically set the button lable, based on the file status (imaged, not imaged or has error) in that row. This wroks well, only if all the files in the multi row block have the same status. If each of them have diff statuses, then only last processed files's status gets reflected into the button label. For eg: The file in the first row of the block is imaged, and one in the second row has an imaging error. The button label for the first row should say 'View Image' and button for the second row should say 'View Error'. But now buttons for both the rows display 'View Error', as thats what got processed last!

I __can not use set_item_instance property for 'label'__ (which lets us dynamically change the label on the push buttons).

Is there any way to do this for ORacle forms? I am now playing with having 3 diff button items in that block, laying them on top of each other and showing only those that are appropriate and hiding the others... But I am not sure it is going to give me what I need? I think I am going to end up facing the same issues as in above case!!

Any expert advice is highly appreciated.

Thanks in advance for your time:
Libran_Girl

Edited by: libran on Aug 30, 2011 8:04 AM

Edited by: libran on Aug 30, 2011 8:05 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 26 2013
Added on Aug 30 2011
7 comments
4,863 views