I have an app with several choice fields that I have added and that write back to text columns in a SharePoint list. Because these are fields I added on the app side, I am unable to make them required. I also can't make the underlying SharePoint columns required. The workaround was to hide the submit button should any of the fields be blank. This is my logic:
If(IsBlank(ChoiceField1),false,true) And If(IsBlank(ChoiceField2),false,true)
And so on for each of my fields. This works initially, but if you go back in and remove a value from the field, the submit button stays visible. How do I update the logic so that it will re-hide the submit button if the user goes back in and removes a value and essentially clears the field?
Solved! Go to Solution.
If(
IsBlank(CostImp_2.Selected.Value) ||
IsBlank(SupImp_2.Selected.Value) ||
IsBlank(LikeSucc_2.Selected.Value) ||
IsBlank(Progress_2.Selected.Value) ||
IsBlank(SavImp_2.Selected.Value) ||
IsBlank(StratVal_2.Selected.Value) ||
IsBlank(QualImp_2.Selected.Value) ||
IsBlank(QualComp_2.Selected.Value),
false,
true
)
SubmitButton.Visible =
If(
IsBlank(ChoiceField1.Selected.Value) ||
IsBlank(ChoiceField2.Selected.Value) ||
IsBlank(ChoiceField3.Selected.Value),
false,
true
)
I hope i can help you.
Isn't is nicer for the User Expierence to always see the button but when you are not match amount of required fields the button is disabled?
If this is something you want you can do in the Displaymode of your submit button the formula
If(IsBlank(ChoiceField1) And IsBlank(ChoiceField2),DisplayMode.Disabled,DisplayMode.Edit)
Kind regards
I like your suggestion, but this throws an error and says that it expects an Enum value. Any ideas?
I tried it and it hides the button, but it doesn't display it when all fields are completed. Any ideas?
all your required choice fields are comboboxes? if so, what are the names of those comboboxes?
If(IsBlank(CostImp_2.Selected.Value) || (SupImp_2.Selected.Value) || (LikeSucc_2.Selected.Value) || (Progress_2.Selected.Value) || (SavImp_2.Selected.Value) || (StratVal_2.Selected.Value) || (QualImp_2.Selected.Value) || (QualComp_2.Selected.Value),false,true)
If(
IsBlank(CostImp_2.Selected.Value) ||
IsBlank(SupImp_2.Selected.Value) ||
IsBlank(LikeSucc_2.Selected.Value) ||
IsBlank(Progress_2.Selected.Value) ||
IsBlank(SavImp_2.Selected.Value) ||
IsBlank(StratVal_2.Selected.Value) ||
IsBlank(QualImp_2.Selected.Value) ||
IsBlank(QualComp_2.Selected.Value),
false,
true
)
User | Count |
---|---|
260 | |
110 | |
98 | |
56 | |
40 |