MACRO: Prompt Validation Example

MACRO: Prompt Validation Example

Prompt Validation Example.kmmacros (4.0 KB)

When validating the input from a Prompt action, my preferred method is to use an Until action and loop until the input is valid. Like this, complete with error message:

Give it shot and let me know what you think.

2 Likes

Hey Dan,

Good idea.

You should do another one that uses one or more regular expressions for validating specific kinds of data input.

-Chris

1 Like

@DanThomas, @ccstone

More generic would be a call (Execute Macro) to a validation macro returning, for example, the right %ActionResult% token… and even more a standardisation (if needed; for example date) of input data.

– Alain

All I was trying to show was the “Until” loop. How the actual validation is done, I don’t care.

I threw this together in response to some code I saw someone post. Let’s just say that their method of re-showing the prompt if it failed validation was slightly convoluted. :slight_smile: