I have a button on my form and I would like to disable this button based on a certain value of the field.
the field is a single line of text field. If the value of this field is "Yes", then the submit button should be disabled. I tried various options with display mode on Form OnVisble property but nothing is working.
I tried the following on DisplayMode property of the button but it didn't work
If(DataCardValue19.Text = "Yes", DisplayMode.Disabled, DisplayMode.Edit) Not sure what I am doing wrong. Can I use Button Rules instead?
Share a screenshot
also check DataCardValue19.Text value by using a Label and setting its tet property to DataCardValue19.Text
Are you sure DataCardValue19 is the name of the input control and can you provide a screenshot?
Hi @cooltechie ,
Do you custom a form in your SP list using PowerApps?
Do you want to disable the Button based on a certain value of the field when you edit an existing record?
I have made a test on my side, please consider take a try with the following workaround:
Set the DisplayMode property of the Button to following:
If( SharePointIntegration.Selected.TextField = "Yes", DisplayMode.Disabled, DisplayMode.Edit )
If( DataCardValue19.Text = "Yes", DisplayMode.Disabled, DisplayMode.Edit )
Note: Please make sure the DataCardValue19 represents the Text Input box related to the Single text column of your SP list within your Edit form (SharePointForm1).
I tried this approach. However, the problem with this is that the button is disabled even when the form is opened new and the value of the text field is blank. How can we solve this?
Your chance to join an engaging competition of Power Platform enthusiasts.
The Super User program for 2022 - Season 2 has kicked off!
Attend in person or online, there are incredible conferences and events happening all throughout the month of September.
In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.