I have a form that has three fields: a text field for the "Subject", a text field for "Emails", and a combo-box for "Internal Users"
My goal: If the Subject is populated AND either of the two other fields ("Emails" or "Internal Users") are populated, I want the "Book" button to be enabled and clickable to submit the form. If this condition isn't met, I want the "Book" button to be disabled. So if the "Subject" field isn't populated, but one of the two other fields is populated, the "Book" button should not be active.
My current code (in the DisplayMode of the "Book" button) currently enables the button if one of the two fields ("Emails" or "Internal Users") is populated:
If(TextInput2.BorderColor=Red&&(CountRows(ComboBox1.SelectedItems)=Blank()||CountRows(ComboBox1.SelectedItems)=0),DisplayMode.Disabled,IsBlank(TextInput2.Text)&&(CountRows(ComboBox1.SelectedItems)=Blank()||CountRows(ComboBox1.SelectedItems)=0),Disabled,!IsBlank(TextInput2.Text)||(CountRows(ComboBox1.SelectedItems)=Blank()||CountRows(ComboBox1.SelectedItems)=0),Edit)
.. but I want to add an extra piece of code that requires the "Subject" to be populated, and then looks to the current condition of my code I attached above (see if one of the "Emails" or "Internal Users" fields are populated to enable the "Book" button).
(Background of my code: My "Emails" text box checks to see if the email address entered is in the correct format. If it is not in the correct format, the border of the box turns red and our boolean variable, 'Label33' is assigned "False". If it is in the correct format, 'Label33' is assigned "True" and the border of the box turns blue ... The conditional assignment of "True" or "False" on that "Label33" is already functional. But if the text box is populated with an incorrectly formatted email ('Label33' is "False"), I don't want the "Book" button to be clickable)
Would anybody be able to provide help in adding in that extra condition?
Thank you so much,
Justin