Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to check date in input form fields

ramprakasht3196
Level 3
Level 3

Hi all,

I had created custom field in delivery Input form.

ramprakasht3196_0-1591195590746.png

While creating delivery if this field is empty , Pop up message should be displayed. I used below code in the input form.

ramprakasht3196_1-1591195834585.png

Now I need to display alert message if the smsMessageExpiryDt less than current date.
Could you please suggest me , how to compare smsMessageExpiryDt with current date.

 

Thanks in advance.

 

Thanks,

Ram.

 

 

1 Accepted Solution
Manoj_Kumar_
Correct answer by
Community Advisor
Community Advisor

Hello @ramprakasht3196 ,

This is the correct syntax,

<leave>
    <check expr="@smsMessageExpiryDt!='' and @smsMessageExpiryDt &gt;= GetDate() ">
      <error>Expiry date cannot be empty and should be in future</error>
    </check>
  </leave>

 

Testing screenshot here:

manojk62306941_0-1591256204497.png

 

Thanks

View solution in original post

7 Replies
Manoj_Kumar_
Community Advisor
Community Advisor

Hello @ramprakasht3196 

 

Try this code:

<check expr="@smsMessageExpiryDt !='' or @smsMessageExpiryDt < getDate()">
<error>Expiry date cannot be empty and should be in future</error>
</check>

Let me know if that works 

Jyoti_Yadav
Community Advisor
Community Advisor

Hi,

 

You can check it using below syntax:

 

<check expr="@smsMessageExpiryDt ='' or @smsMessageExpiryDt &lt; GetDate()">
<error>Expiry date cannot be empty and should be in future</error>
</check>

 

 

Manoj_Kumar_
Correct answer by
Community Advisor
Community Advisor

Hello @ramprakasht3196 ,

This is the correct syntax,

<leave>
    <check expr="@smsMessageExpiryDt!='' and @smsMessageExpiryDt &gt;= GetDate() ">
      <error>Expiry date cannot be empty and should be in future</error>
    </check>
  </leave>

 

Testing screenshot here:

manojk62306941_0-1591256204497.png

 

Thanks

View solution in original post