Hi team,
Iβm building a form building the validation criteria function that I want to make date B should be later than date A. But in my data sometimes date A is missing, so date B can not entry?. How could I solve this problem?
Thank you all
Hi team,
Iβm building a form building the validation criteria function that I want to make date B should be later than date A. But in my data sometimes date A is missing, so date B can not entry?. How could I solve this problem?
Thank you all
Hi @manh_nguyen,
How about creating a dummy calculation? For example; in case of A is missing select today() as a milestone so B should always be later than today?
The above option could be changed according to your needs.
@manh_nguyen, you should be able to do it as outlined in the image shared below:
Constraint Date.xlsx (9.7 KB)
Hi @Kal_Lam, How about date1 is empty but i still want to enter date 2?
For example in my data the first test date is missing but I already set the constraint for the second test date that should be later than first test date. It will show the message as below. the think that i want is still enter the date for second test even thought the first test date is empty
Hi @manh_nguyen,
Thatβs why Kal provided an if
statement in the constraint saying:
IF Date 1 NOT EQUALS to EMPTY VALUE then DATE2 should be bigger than DATE1
In my example, some records has the value for date 1 and some donβt. In Kalβs example, date 1 is required. What should i change in the If function that if date 1 is not equal to empty date 2 should be greater than date 1 and if date 1 equal to empty date 2 should later a certain date (example 2022-05-30)?
if(${date1} != ββ, .>${date1}, . >= date(β2021-04-01β) and . <= date(β2021-10-01β))
thank you i found my solution
Hi @hakan_cetinkaya, I used the syntax above but when i deployed my form, it automatically change from this
if(${date1} != ββ, .>${date1}, . >= date(β2021-04-01β) and . <= date(β2021-10-01β)) to this
. >= date(β2021-04-01β) and . <= date(β2021-10-01β) only and the if statement disappeared.
Do you know what happened?
Hi @manh_nguyen,
Where did you use that syntax, can you show a screenshot?
@manh_nguyen, try this it should work β¦
if(${date1} != '', .>${date1}, (. >= date(β2022-06-01β) and . <= date(β2022-06-30β)))
Constraint Date.xlsx (9.7 KB)
it works perfectly. Thank you very much @Kal_Lam