cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ACPBSCi
Resolver I
Resolver I

Re-hide button when field is cleared

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?

1 ACCEPTED SOLUTION

Accepted Solutions

@ACPBSCi 

 

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

)

View solution in original post

7 REPLIES 7
Alex_10
Super User
Super User

SubmitButton.Visible =
If(
    IsBlank(ChoiceField1.Selected.Value) ||
    IsBlank(ChoiceField2.Selected.Value) ||
    IsBlank(ChoiceField3.Selected.Value),

        false,
        true
)

JacoDeRooij
Helper II
Helper II

@ACPBSCi 

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?

@ACPBSCi 

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)

@ACPBSCi 

 

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

)

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,833)