One way to handle this would be to have a radio button group with a button for each type of entry possible. Create in advance a variable edit for each type of data with the appropriate datatype and formatting, and corresponding labels, but click "hide on startup" for each.
Have the user click the button for the type of entry they wish to use, then reveal the appropriate variable edit and label. We have a similar condition where the user can enter a customer name or number. That's easier, since if it begins with an alpha character it is a name else it is a number. Your situation is a bit more complex. Deciding whether an entry is a phone number, date or client ID could be trickier. You can explore the (ISALPHA(x)) and (ISDIGIT(x)) functions. Dates are more difficult - do they have formatting or not? Are they entered in MMDDYY, MMDDYYYY, YYMMDD, etc. sequence? How do you handle the difference between 100109, 10109, 10012009, etc., which can all be forms of the same date? Couple that complexity with the fact that your input field would have to be a TEXT datatype, and the task becomes unwieldy. So, I'd think that the radio group approach would be a good way to proceed; at least you know the user's intent. Emmitt Dove Manager, Converting Applications Development Evergreen Packaging, Inc. [email protected] (203) 214-5683 m (203) 643-8022 o (203) 643-8086 f [email protected] -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of mjsmd Sent: Saturday, October 31, 2009 8:12 AM To: RBASE-L Mailing List Subject: [RBASE-L] - How do I check the data type of user entered data? Hi all, I want my user to be able to have the option of entering a birthday, last name, client ID (an integer less than 999999) or a phone number (a number greater than 1000000) in order to select the desired client. What is the best way to determine the type of data that was entered? Is there a funtion that returns the data type? > --- RBASE-L ================================================ TO POST A MESSAGE TO ALL MEMBERS: Send a plain text email to [email protected] (Don't use any of these words as your Subject: INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH, REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP) ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [email protected] In the message SUBJECT, put just one word: INTRO ================================================ TO UNSUBSCRIBE: Send a plain text email to [email protected] In the message SUBJECT, put just one word: UNSUBSCRIBE ================================================ TO SEARCH ARCHIVES: Send a plain text email to [email protected] In the message SUBJECT, put just one word: SEARCH-n (where n is the number of days). In the message body, place any text to search for. ================================================

