Validating and getting feedback messages

Validating and getting feedback messages

  
Hi,

I'm not an experienced user of Outsystems and I've got a problem, I guess the solution may be quite simple, yet, I don't know how to reach it.
I have an Entity that represents a period of time using a service, and it has a "start date" and an "end date".
What I need is to validate the dates (as the "end date" can't be before the "start date") and get a feedback message, informing the user why the insertion has failed if the dates aren't valid.
I also need to assure that the "start date" isn't empty.
Can someone help me?

Thanks, Chiapa

Hi Chiapa,
In action save, you need implements the validation with an "if" condicion and change the attributes Valid and ValidationMessage, like this: 

Ex.:
DateStart.Valid = False
DateStart.ValidationMessage = "Error message"

Best Regards
João Esteves
Hi Chiapa and João,

Welcome to the forums - hope you both enjoy your stay here!

Thank you João, in particular, for making your first post a reply to help a fellow newcomer: this is exactly the reason why the OutSystems user community is such an awesome group!

Cheers to both,


Miguel
João wrote:
Hi Chiapa,
In action save, you need implements the validation with an "if" condicion and change the attributes Valid and ValidationMessage, like this: 

Ex.:
DateStart.Valid = False
DateStart.ValidationMessage = "Error message"

Best Regards
João Esteves
 
 Hi João, thanks for your reply and help

I haven't tested your suggestion as I found another one. In the action save - of the TableNameEdit - I used an "if" condition that checked if the ending date was before the starting date. If true, it went to an error message which I created, else, it continued normally allowing the insertion of the new registry. This way, it is now working.

Thanks again

Best regards,
Chiapa