Hi ,
I have a box in a form that needs the user to enter an input field(VARCHAR). The input field format is
USA /___________/ B(U)-96
Is there anyway to make sure the entry matches this format? I don't want users to put in input field that are not the right format and also where the USA/, B(U)-96 is fixed.
@WillowMobileSys @AleksiAlkio @Suvrutt_Gurjar @Marc_Dillon @SkrOYC @jaichith
You better use two fields, one shown to the user to input just what you need and the other hidden with an AppFormula having what you want in the format you want.
AppSheet doesn't allow what you are trying to do in the way you expect
@Abinaya_Abi123 wrote:
and also where the USA/, B(U)-96 is fixed.
If the "USA/" and the "/B(U)-96" parts are fixed, why burden the user with entering those each time? Have them enter only the variable part.
Though you then might want to validate they have NOT entered the fixed portions. To do that use the CONTAINS() function in the Valid If like this:
AND(NOT(CONTAINS([_THIS], "USA/"),
NOT(CONTAINS([_THIS], "/B(U)-96")
)
If validation fails then present a message similar to: "Please enter only the variable portion between the slashes. The system will automatically add the prefix and postfix portions ."
Otherwise, if you must have the users enter the full value and need to validation that, then you will want to use the LEFT() and RIGHT() functions in the Valid If similar to this:
AND( LEFT([_THIS], 4) = "USA/"
RIGHT([_THIS], 8) = "/B(U)-96"
)
I hope this helps!
Have 2 separate fields for inputs and combine them to single field . So that format will not change.
Use functions like
Concatenate ()
Input()
If or ifs ()
User | Count |
---|---|
16 | |
10 | |
10 | |
8 | |
3 |