open form with according layout

eugzl

04-04-2018

Hi All.

In my form when user fill the form the textField get some value. Then user save the form. Then form saved and closed. Based on value of textField I would like to open form with according layout.

What event I must to use if I have some conditions:

if textField1==3 then I would like to show only subForm1 when form is open;

if textField1==2 then I would like to show only subForm2 and subForm3 when form is open.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

MinusZero

04-04-2018

Simplest way is with an if statement, switch would work also.

In the Form's docReady event [form1::docReady - (JavaScript, client)] put this:


if(textField1.rawValue == 3) //if the textfield is 3, show subForm1
{
subForm1.presence = "visible";
}

else if(textField1.rawValue == 2) //if the textfield is 2, show subForm2
{
subForm2.presence = "visible";
}

else //if the textfield is anything else, do nothing.
{}

Answers (0)