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

)

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (4,379)