[RPG](offline) bindable properties already expanded?

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](offline) bindable properties already expanded?

Post 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
tsupartono
Posts: 289
Joined: Wed Apr 18, 2012 10:21 am

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

Post 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                                       )
MegumiSawada
Posts: 268
Joined: Tue Feb 19, 2013 5:18 pm

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

Post by MegumiSawada »

Hi Tony,

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

Best Regards,
Megumi
Post Reply