Disable or enable form button using filter

I create 2 buttons on form page once greyed out with filter condition "=AND($[Subject content]="")" while on the form submit button i want to implement 1 check that it would not let me save already added subject content so i put a logic "=AND(Subject[Subject] <> $[Subject content])"but it threw me value error and button won't enable ...
any help would be really appreciated.

Hi @yebe-e417 , welcome to the community! :honeybee:

First, I'll note that if you only have one condition to check, you wouldn't need the AND() operator.

This means your visibility formula on your greyed out button could simply be: =$[Subject content]=""

And your formula to display the blue submit button would be: =$[Subject content]<>""

Hope this helps! Let us know if you have any other questions. :slightly_smiling_face: :honey_pot:

Hey Alyssa,
Sorry if My question being vague but issue is not only to enable and disable the button for simple condition of being null or not null ...but I want to check if user input is same as that of my database value it shouldn't let me enter that again but if it's different than my database input only then enable the submit button . I mean real time check while feeding the value from data base for ex : In Employee Table >-
Employee_Name :
Alyssa

now if I try to put the same name in $ EmployeeName content
so logic I tried :
=if ($[EmployeeName content]<>Employee[EmployeeName], True,False) ie enable submit button

=if ($[EmployeeName content]=Employee[EmployeeName],False,True) ie disable submit button or grey the button ..

I tried with every combination of Findrow, filter ,if condition and
"and " condition ..

Hope it helps.

Thanks

Hi @Davi-3ebb :honey_pot:

Got it! I see what you'd like to do.

For this, you would use FILTER() to check if the input is already in a specified table column, and the true/false check would be based on if there are zero or one or more entries that match the input. Then, to combine the check if the field is blank or not, you would use AND and OR accordingly to incorporate the formulas in my previous answer.

This is how it would look:

I set up an example where the user input would check against the Name column of a People table.
The blue submit button will only display if the column does not already have a name that matches the user's input and if the field is not blank:
=AND($[UserInput]<>"", FILTER(People, "People[Name]=$[UserInput]")=0)

The grey submit button shows instead if the name is already in the table or if the field is blank:
=OR($[UserInput]="", FILTER(People, "People[Name]=$[UserInput]")>0)

Let me know if that helps and is what you were looking for. :slight_smile: :honeybee:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.