Hi!
In my app, admins can create new users. However, I want the form to check if an existing user already uses the email address and username. How would I be able to create such a check?
Hi!
In my app, admins can create new users. However, I want the form to check if an existing user already uses the email address and username. How would I be able to create such a check?
Make a custom form, then do a relation from your text entry to the list of existing emails/names. If the relation(s) is/are not empty then you show a text telling the user that the email/name already exists.
Thanks for you reply. How would I make a relation if the field being filled is linked to where the email stored? Do I have to make a relation between the textfield and the column it stores the data?
That’s correct.
Your input component should be writing the value to a user specific column. You create the relation between that column and the final destination column.
You can make a copy of the app in that linked thread and study it to see how it works.
Thanks! I will try it out and let you know
I’m currently trying to set this up. However, I notice on ‘text entry’ fields I am not able to make them required. On dropdowns (choices) I am able to make them required.
Any possibility to make text entry fields required in a custom form?
You make them required by not allowing them to submit/move forward if the field in question is empty.
Unfortunately, no. This is one of the drawbacks of using custom forms.
What I usually do is use double asterisks ** to indicate required fields, and then as @ThinhDinh mentions, simply not allow the user to save if all pre-conditions are not met.
Again, if you look at the demo app, there is an if-then-else column that is used for this.
That column only returns true if:
The column is then used in the custom action to determine whether or not the record can be saved.