
Hello
I've been working on disabling a button when certain parameters are not meet in a form. Now this feature was working very well and then suddenly it stopped working and I am unsure why this is. The code I am using is -
If (DataCardValue8.Text = "A" || "N" || "X" || "" , DisplayMode.Disabled, Edit)
This can also be seen in the photos below.
As you can see I want it to disbale the submit button when the Text is A,N, X or blank. But it is only working when it is A and I've moved around the letters and it is only working for the first letter. Does anyone know why this is and how I can fix it?
I don't think you can use OR using the syntax you are using. The whole equation needs to be added to the OR. Something like this.
If (DataCardValue8.Text = "A" || DataCardValue8.Text = "N" || DataCardValue8.Text = "X" || DataCardValue8.Text = "" , DisplayMode.Disabled, DisplayMode.Edit)