7
Views
6
Comments
Solved
date filter
Question

hello all,

give me condition for if the date is higher then current date it should show validation. if the from input widgets have future date it should give validation.

Rank: #143
Solution

Hi Ansari,


Your problem is because one of the types is a Text and the other is a Date.

Make sure both of your variables are Dates and you will be able to compare them.


Why are you using from.TypedValue? You can use the FromDate variable directly instead.


Kind regards,

Rui Barradas

Rank: #143

Hello Ansari,

You've just created a very similar thread: https://www.outsystems.com/forums/discussion/63699/filter-validation/ 


Like said in the other thread, there are some events that you may use to achieve what you want.

These events are triggered by different behaviors, for example, OnChange and OnBlur events.

You just need to create one screen action to validate the date and associate that screen action to one of these events, depending of the behavior that you want.


Your validation to compare if the date is in the future should be something like this:

SelectedDate > CurrDate()

where SelectedDate is the variable associated to your From: input widget.


Kind regards,

Rui Barradas

Rank: #143
Solution

Hi Ansari,


Your problem is because one of the types is a Text and the other is a Date.

Make sure both of your variables are Dates and you will be able to compare them.


Why are you using from.TypedValue? You can use the FromDate variable directly instead.


Kind regards,

Rui Barradas

Rank: #143

If you don't manage to do it, please share your OML with me.


Kind regards,

Rui Barradas

Rank: #143

You're welcome Ansari.

Glad that I could help you.


Kind regards,

Rui Barradas