Page 1 of 1

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

Posted: Mon Oct 24, 2016 5:08 pm
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

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

Posted: Tue Oct 25, 2016 8:09 am
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).