Using an IF Statement in FORM

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Frank2
Posts: 21
Joined: Tue Nov 17, 2020 10:33 pm

Using an IF Statement in FORM

Post by Frank2 »

Hi All,

Please advise if it is possible to use an IF statement in a FORM in the same way as in a query to display different info.
See example:

# } if(data["IncludeTest"]=="No"){ # .....

Thanx
himanshu
Posts: 722
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Re: Using an IF Statement in FORM

Post by himanshu »

Hi,

<<IF BO.IncludeTest = 'Yes' THEN SHOW SECTION_START>>
// Show this
<<SECTION_END>>
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Using an IF Statement in FORM

Post by Jaymer »


Or put your fields inside a separator group, with a condition on the visible property
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Frank2
Posts: 21
Joined: Tue Nov 17, 2020 10:33 pm

Re: Using an IF Statement in FORM

Post by Frank2 »

Hi,

Thank you very much. Appreciate.

regards
rocketman
Posts: 1239
Joined: Fri Jan 02, 2009 11:22 pm
Location: Preston UK
Contact:

Re: Using an IF Statement in FORM

Post by rocketman »

As Jaymer Said, Separator group is the way to go. No coding required - elegant and easily maintainable solution. Just keep in mind you need the separator end as well as the separator start lines in otherwise, the condition will be ignored
Rocketman

V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
Post Reply