Hi all,
I am hoping someone can help me in creating a formula that shows and hides fields based on two unrelated conditions. The form I have built is for recording training sessions. Some training sessions have 1 trainer and 1 trainee, while others have multiple trainees. I have a text box that is the user is required it input the number of trainees. Based on the number inputted, it will display the correct amount of drop down menus with employees names and Pen Inputs for them to sign in. After they have signed, I have a save button which triggers my flow to save the signature as an image. I want the save button to also hide the drop down menu and signature pen input once it was been pressed. I have tried a number of formulas but it either doesn't show any fields when I put a value into the text box, or doesn't hide them once the save button is pressed. I have listed two different methods I've tried below. Any help would be greatly appreciated!
First method:
Set the Visible property of my data card to:
If(Value(Txt_Number_Trainee1.Text)>=2,true,Btn_Trainee1_Save.Pressed,false)
This works for the visibility based on the number of trainees, but doesn't hide the fields when I press the save button.
Second method tried:
Set an UpdateContext on the OnVisible property of my form screen to:
UpdateContext({ShowT1: false}) (I don't want the fields to be visible by default when going into the form)
I sent the Visible property of the data card to:
If(Value(Txt_Number_Trainee1.Text)>=2,true,ShowT1,false)
and then the OnSelect property of my save button to:
UpdateContext({ShowT1:false});
OJT_TraineeSignature_1.Run(varReqID,Mid(JSON(PenTrainee1.Image,IncludeBinaryData),24,
Len(JSON(PenTrainee1.Image,IncludeBinaryData))-24));
Notify("Signature Saved",NotificationType.Success)
This still shows the fields based on the values, but wont hide the data cards after pressing the save button.

