I have a form, in which I have six mandatory fields, however I want to be able to check if all of those fields have data entered before allowing the user to submit the form to the sharepoint list, and to display a warning dialogue box if one or more is blank.
I created the dialogue box, and the variable (PopUp) which will be false upon starting the screen. Then in the submit button, I used the following formulae for the On Select property. but there's an error and I am not sure what the error is.
UpdateContext({countmandatory: CountIf(IsBlank(DataCardValue40.text),IsBlank(Dropdown1.SelectedText),IsBlank(DropDown2.SelectedText),IsBlank(DataCardValue8.Text),IsBlank(DataCardValue28.Text),IsBlank(DataCardValue35.text))});
If(countmandatory=0,UpdateContext({PopUp:true}),UpdateContext({PopUp:false}),SubmitForm(Form1))
Wondered if anyone could assist me with the above formula (I create the other variable for the countif function in the formula and it doesn't appear anywhere else)
Solved! Go to Solution.
If these are required fields in your form, then you can simply use the Valid property on the form.
If(Form1.Valid,
SubmitForm(Form1),
UpdateContext({PopUp:true})
)
I hope this is helpful for you.
If these are required fields in your form, then you can simply use the Valid property on the form.
If(Form1.Valid,
SubmitForm(Form1),
UpdateContext({PopUp:true})
)
I hope this is helpful for you.
User | Count |
---|---|
126 | |
87 | |
84 | |
75 | |
69 |
User | Count |
---|---|
214 | |
178 | |
140 | |
105 | |
83 |