[RPG]Changing Backcolor of DropDown in a table on value change

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
MegumiSawada
Posts: 268
Joined: Tue Feb 19, 2013 5:18 pm

[RPG]Changing Backcolor of DropDown in a table on value change

Post by MegumiSawada »

Hi,

I would like to change the backcolor of dropdown in a table row if its value is changed.
THis works offline.
I thought I can do it with using javascript like this;

Code: Select all

/* These files should be saved as UTF-8 */ 
var myId = "";
var myId2 = "";
var myValue = "";
lrexec( 
               function()
               {
                  myId = "Form.Fields.TABLE1.CurrentRowID%1";
     	 	 this.q_getProperty(myId); 
               },
               function(var1) 
               { 	
                  myValue = var1 ;
                  myId = 'Form.Fields.TABLE1.Row%' + myValue;
                 /* Now Queue a request show the updated variables as results on the screen */
                  myId2 = myId + '.DDOWN1.BackColor';
                 var propsout =
                 {
                    myId2: "RED"
                 };
                 this.q_setProperties(propsout); 
               }, 
               /* End marker */
               null 
             );
However, I don't know how to set table "ID" of the table on offline form.

The ROWLIST of this table is as follows:

Code: Select all

A                                      ROWLIST.&+                            
A                                      ( +                                   
A                                       TBL:CONTACT +                        
A                                       SQL:"SELECT ROWID,EMPNO,SURNAME, +   
A                                       HOMEADDR2 FROM CONTACT" +            
A                                       ) +                                  
Could you please give me some advice how to implement this?

Best Regards,
Megumi Sawada
tsupartono
Posts: 289
Joined: Wed Apr 18, 2012 10:21 am

Re: [RPG]Changing Backcolor of DropDown in a table on value change

Post by tsupartono »

Megumi,
Unfortunately it's not possible to change the property of elements in a particular row when they are bound (property values come via the bindings, but they can't be explicitly specified).
Post Reply