Page 1 of 1

[RPG](offline) bindable properties already expanded?

Posted: Mon Oct 03, 2016 8:18 pm
by MegumiSawada
Hi,

I would like to do the same thing as the following topic:
http://longrange.lansa.com.au/viewtopic.php?f=11&t=229

I would like to change the color of table column if its value is changed.

Are bindable properties already expanded?
If so, could you please let me know how to use it?

Best Regards,
Megumi Sawada

Re: [RPG](offline) bindable properties already expanded?

Posted: Tue Oct 04, 2016 8:40 am
by tsupartono
Megumi,
the common BackColor property and Label's Color property are both bindable.

Example - you can bind the following SQL statement to BackColor or Color property (label) so it will show in blue if the NAME field is longer than 5 characters, or green otherwise.

Here is an example (DDS) of how you bind the SQL statement to the BackColor property of a table column.

Code: Select all

     A                                       Col%2
     A                                       ( 
     A                                         Name: NAME1
     A                                         Type: Label
     A                                         Header.Value: "First Name"
     A                                         Content.Text.& ( FLD:NAME )
     A                                         Content.BackColor.& ( SQL:"
     A                                           SELECT CASE WHEN
     A                                           LENGTH( &(FLD:NAME) ) > 5
     A                                           THEN
     A                                           ''Blue'' ELSE ''Green''
     A                                           END" )
     A                                       )

Re: [RPG](offline) bindable properties already expanded?

Posted: Tue Oct 04, 2016 11:42 am
by MegumiSawada
Hi Tony,

Thank you!
I have tried it and confirmed that I can get the expected result.

Best Regards,
Megumi