Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
subin6600
Creator III
Creator III

how to validate date while entering in the input field.

Hi Qlikwers!!

I have an input field which is like a write back functionality to the data base using macros and trigerring it with EDX.

But I want to make some error handlings like if the user enters the date I want it to be in the correct format.

For now the date format is YYYYMMDD. where i want the date & Month and 8 digits to be validated in the macro itself.

If any one have come across such a situation and knows the solution please let me know.

Thanks in advance.

Subin

3 Replies
Not applicable

I don't know if this helps, but you can somewhat control this by the input box itself.

You can right click the input box, properties->constraints->Click custom

then define it as something like

len($)=8 and mid($,5,2) <= '12' and mid($,7,2) <= 31

Then you can also check error message below and type in something like:

Please enter date in the format 'YYYYMMDD'

Now whenever the user enters in a date that does not follow your parameters this error message will pop up until they meet the correct requirements.

I will try making it in a macro next but figured this might fix your problem without the use of a macro.

Hope this helps!

-Brandon

subin6600
Creator III
Creator III
Author

Thanks Bapperson,

But how can i get the Properties> Constraints options??

I have a table in which one column is an input field which is mentioned in the script like inputfield xyz;

Not applicable

Hello,

does anyone got an idea for this question ? I have the same problem

Thanks

Sophie