cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Hide Submit until DataCards and Dropdown contain data

Needing some help getting my submit button to hide until certain values contain data. I need the dropdown and data cards to be populated before the Submit button is clickable. See screenshot below.

 

hidesubmit.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Hide Submit until DataCards and Dropdown contain data

Hi @kriggo15 ,

What @Pstork1  and @PowerAddict  povided are two different ways.

To change the button's visible, you need use the formula in the button's Visible property.

To change the button's mode, you need to use the formula in the button's DisplayMode.

 

Could you tell me are DataCard45,DataCard46,DataCard47,DataCard48 rating controls?

If so, rating control's value will never be blank. Its value just will change based on your selection.

 

Could you tell me whether do you want the rating value not be equal to 0 or the rating value should be changed?

1)If you want the rating value not be equal to 0, please try this formula (set the button's Visible)

If(!(DataCardValue45.Value=0) && !(DataCardValue46.Value=0) && !(DataCardValue47.Value=0) && !(DataCardValue48.Value=0) && !IsBlank(DataCardValue26.Selected.Value), true, false)

2)If you want the rating value should be changed, I suggest you set rating's OnChange to set variable. 

Then use this variable to justify whether the rating value has been changed.

Please try this:
set DataCard45's OnChange: Set(var1,true)

set DataCard46's OnChange: Set(var2,true)

set DataCard47's OnChange: Set(var3,true)

set DataCard48's OnChange: Set(var4,true)

set the submit button's Visible:

If(var1&&var2&&var3&&var4&& !IsBlank(DataCardValue26.Selected.Value), true, false)

 

If you want to change the button's mode, all the formulas are similar, just note that you need to set the button's DisplayMode property.

1)not equal to 0

use this formula:

If(!(DataCardValue45.Value=0) && !(DataCardValue46.Value=0) && !(DataCardValue47.Value=0) && !(DataCardValue48.Value=0) && !IsBlank(DataCardValue26.Selected.Value),DisplayMode.Edit,Disabled)

2)not change

use this formula:

If(var1&&var2&&var3&&var4&& !IsBlank(DataCardValue26.Selected.Value), DisplayMode.Edit,Disabled)

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Highlighted
Super User II
Super User II

Re: Hide Submit until DataCards and Dropdown contain data

In the Visible property of the Submit button, you can add something like this: 

 

If(!IsBlank(DataCardValue1.Text)  && !IsBlank(DataCardValue2.Selected.Value), true, false)

 

For this example, I have only assumed 2 data cards. Replace that with all the datacards that you have. Let me know if this helps. 

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)

Highlighted
Dual Super User III
Dual Super User III

Re: Hide Submit until DataCards and Dropdown contain data

@PowerAddict 's solution is the correct one for what you asked, wut I would like to suggest an alternative that I think is a better experience for the user. Instead of hiding the button I would recommend disabling it in the Display settings using something like this.

If(IsBlank(DataCardValue1.Text)  || IsBlank(DataCardValue2.Selected.Value), DisplayMode.Disabled, DisplayMode.Edit)

Using this the button will show as greyed out, but the user won't be able to click on it until they fill in the form. 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Super User II
Super User II

Re: Hide Submit until DataCards and Dropdown contain data

Sure, either one works, depending on what the need is. 

Highlighted
Helper V
Helper V

Re: Hide Submit until DataCards and Dropdown contain data

It is almost working. If I choose all of the ratings first without a booth, then the button is not visible (which is correct). When all ratings and booth name is populated, the button is visible (also correct). But, if I choose the Booth Name and nothing else, the button is visible (incorrect).

 

Here's my formula. Note that DataCardValue26 is the dropdown.

If(!IsBlank(DataCardValue45.Value) && !IsBlank(DataCardValue46.Value) && !IsBlank(DataCardValue47.Value) && !IsBlank(DataCardValue48.Value) && !IsBlank(DataCardValue26.Selected.Value), true, false)

Highlighted
Helper V
Helper V

Re: Hide Submit until DataCards and Dropdown contain data

@Pstork1 I tried your suggestion as I like the idea of it being grayed out, but I'm getting an error that it is expecting a true/false value which is causing the button to not work.

 

Formula:

If(IsBlank(DataCardValue45.Value) || IsBlank(DataCardValue46.Value) || IsBlank(DataCardValue47.Value) || IsBlank(DataCardValue48.Value) || IsBlank(DataCardValue26.Selected.Value), DisplayMode.Disabled, DisplayMode.Edit)

Highlighted
Dual Super User III
Dual Super User III

Re: Hide Submit until DataCards and Dropdown contain data

Its something in the way you are evaluating the IsBlank values.  Based on your previous reply I think its the IsBlank(DataCardValue26.Selected.Value). 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Community Support
Community Support

Re: Hide Submit until DataCards and Dropdown contain data

Hi @kriggo15 ,

What @Pstork1  and @PowerAddict  povided are two different ways.

To change the button's visible, you need use the formula in the button's Visible property.

To change the button's mode, you need to use the formula in the button's DisplayMode.

 

Could you tell me are DataCard45,DataCard46,DataCard47,DataCard48 rating controls?

If so, rating control's value will never be blank. Its value just will change based on your selection.

 

Could you tell me whether do you want the rating value not be equal to 0 or the rating value should be changed?

1)If you want the rating value not be equal to 0, please try this formula (set the button's Visible)

If(!(DataCardValue45.Value=0) && !(DataCardValue46.Value=0) && !(DataCardValue47.Value=0) && !(DataCardValue48.Value=0) && !IsBlank(DataCardValue26.Selected.Value), true, false)

2)If you want the rating value should be changed, I suggest you set rating's OnChange to set variable. 

Then use this variable to justify whether the rating value has been changed.

Please try this:
set DataCard45's OnChange: Set(var1,true)

set DataCard46's OnChange: Set(var2,true)

set DataCard47's OnChange: Set(var3,true)

set DataCard48's OnChange: Set(var4,true)

set the submit button's Visible:

If(var1&&var2&&var3&&var4&& !IsBlank(DataCardValue26.Selected.Value), true, false)

 

If you want to change the button's mode, all the formulas are similar, just note that you need to set the button's DisplayMode property.

1)not equal to 0

use this formula:

If(!(DataCardValue45.Value=0) && !(DataCardValue46.Value=0) && !(DataCardValue47.Value=0) && !(DataCardValue48.Value=0) && !IsBlank(DataCardValue26.Selected.Value),DisplayMode.Edit,Disabled)

2)not change

use this formula:

If(var1&&var2&&var3&&var4&& !IsBlank(DataCardValue26.Selected.Value), DisplayMode.Edit,Disabled)

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,447)