I’ve got button on a web form that I am creating to dynamically unhide fields on a form. Basically, I’m using @Setfield to change the parameters of the linked hidden field to determine whether it should be hidden or not. I’m starting to find that @Setfield may not work on the web like in the client. Here is the code I’m using behind the button. Please let me know if I should be attempting to do this another way or with JS? If JS is the answer, please provide an example. I’m very raw at JS. BTW, I am generating HTML for all fields. Thanks!
FIELD HideChildController2 := HideChildController2;
@If(HideChildController1 = 0 ;@SetField(HideChildController2;0);1);
@Command([RefreshHideFormulas]);
FIELD HideChildController5 := HideChildController5;
@If(HideChildController4 = 0 ;@SetField(HideChildController5;0);1);
Subject: Well, first off your @Command is in the wrong spot…
Try:FIELD HideChildController2 := @If(HideChildController1 = 0 ;0;1);
FIELD HideChildController5 := @If(HideChildController4 = 0 ;0;1);
@Command([RefreshHideFormulas]);
Subject: SOLUTION
Bill, thanks for your help. The following code allows me to dynamically add a row by clicking on that button thanks to you guiding me in the right direction:
FIELD HideChildController2 := @If(HideChildController1 = 0 & Child1 != “” ;0;1);
FIELD HideChildController3 := @If(HideChildController2 = 0 & Child2 != “”;0;1);
FIELD HideChildController4 := @If(HideChildController3 = 0 & Child3 != “”;0;1);
FIELD HideChildController5 := @If(HideChildController4 = 0 & Child4 != “”;0;1);
FIELD HideChildController6 := @If(HideChildController5 = 0 & Child5 != “”;0;1);
FIELD HideChildController7 := @If(HideChildController6 = 0 & Child6 != “”;0;1);
FIELD HideChildController8 := @If(HideChildController7 = 0 & Child7 != “”;0;1);
@Command([RefreshHideFormulas])