0
votes

I have various Text input fields in my blank page of Power Apps, I want to implement a functionality where the user is unable to submit the form if any of the fields are kept blank. I saw various sources and used this on my submit BUTTON. Selecting DisplayMode and writing this code there:

If(!IsBlank(TLow.Text || !IsBlank( THigh.Text || 
!IsBlank(TTime.Text || !IsBlank( AlertSeverity.Text || 
!IsBlank(RTime.Text || !IsBlank(An.Text)))))),
DisplayMode.Disabled,DisplayMode.Edit)

However I am unable to achieve what I want ( i.e Submit button should only be enabled if all the fields are filled ) Where am I going wrong?

1

1 Answers

1
votes

I was doing a very small error , I was not converting "number" to "Text" value. This is the code I implemented and achieved my functionality

 If(!IsBlank(AlertDescription.Text) && !IsBlank(AlertSeverity.Text) 
&& !IsBlank(Value(ThresholdHigh.Text)) 
&& !IsBlank(Value(ThresholdLow.Text)) 
&& !IsBlank(Value(ThresholdTime.Text))
 && !IsBlank(Value(ResolutionTime.Text)),DisplayMode.Edit,DisplayMode.Disabled)