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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,257)