Force User to Input a Number

Probably a basic question…

When using Prompt User for Input, is there a way to only allow them to enter a number?

Thanks in advance.

–Craig

Not really, no. Your best bet is to validate it, probably using a regex like this:

^\d+$

For an example of a prompt with validation, see this:

Let me know if you need more information.

Hey Dan,

Yes, you were kind enough to supply the prompt validation macro the other day, and I’ve now used it extensively.
I just couldn’t figure an easy way to check the input for a number vs. letters, symbols, etc.

Oh, cool, I didn’t remember that was you. Sorry! :blush:

Does the regex I posted make sense, or do you need more information? I never know how detailed an answer is needed.

I have the same question, also total noob. How do i insert that regex. At the moment your macro forces the user to put something in so it cant be skipped, but not the right thing, for instance a number.