how can I restrict a field to only choosing one of two letters, for example the letter "I" or "X"
it worked but not exactly the way i wanted it to,with your suggested custom validation script if you enter any letter other than X and I it will automatically replace that letter with X or I, and what i want it to be doing instead is not be able to enter that letter from the first place and maybe give and alert that you can only enter the letters X or I
No, it doesn't replace what you enter, but it does reject it and revert to the previous value.
To do what you described you would need a Keystroke script, like this:
if (event.value) event.rc = (AFMergeChange(event)=="I" || AFMergeChange(event)=="X");
if (!event.rc) app.alert("You must only enter \"X\" or \"I\".");
It's possible the code will "disappear" once you enter it, but it should still work.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.