
Announcements
Hello,
I wanted to update the text on the error message on a form. Instead of Text = Parent.Error, I wanted to customize the error message. However, when I changed the erorr message, it always displayed on the form. Is there a way I can customize the error message and have it only display when the user hits submit and the form does not go through?
Thank you in advance.
@mglemser I presume you have something like a Label control and the error text is in the property Text.
You must change the Visible property of your Label so it is not visible when you don't want it to be.
1. On the Visible property of your Label:
//pseudocode
varShouldBeShowing
2. On the OnFailure property of your Form:
//pseudocode
//...
//whatever existing formulas you already have here...
//...
Set(varShouldBeShowing,true);
3. Wherever you want to stop showing the Error on the screen, (you need to decide where this is).
If you're not sure, let me give you an example how you could do this:
For now, let's suppose you want to forbid any further interaction with the Form until the error message is cleared from view explicitly by the user. To do this:
3a. On the DisplayMode of the Form, use this formula:
//pseudocode
If(varShouldBeShowing,View,Edit)
//instead of "Edit", put "New" if it's more appropriate above - without the quotes.This means if the error is showing, the Form is not editable at all - otherwise, it is.
3b. Insert a Button control.
For the Text property put something like "Clear Error Message"
3c. For the Button control that you added, on the OnSelect property, use this formula:
//pseudocode
Set(varShouldBeShowing,false)
Now see if this works for you. The Error Label Control should no longer be visible while they are filling out the form, or upon subsequent attempts to edit the form.
See if it helps @mglemser