Wednesday, March 25, 2009

Display Logic

http://sourceforge.net/forum/forum.php?thread_id=3100835&forum_id=549512
Question-
Hi,

I want to hide a field in screen based on another field, (string) starts with CAN.
Example -- City like 'CAN%'

I don't know what was the syntax for 'like' in display logic?
Help me.

Answer-

Hi,

Display logic in field tab is used for this purpose. Display logic is a boolean expression that make the field visible when it is evaluated to true. This expression is pseudo javascript (in fact is javascript, but for comparison operators it is used = and ! instead of == and !=). Thus the starts with comparison must be implemented in javascript, for example:

@YourFieldToCompare@.substr(0,3)!'CAN'

This would hide the field in case its value start wiht CAN (note it is case sensitive)

No comments:

Post a Comment