Hi All, My use case is to check the current date, If its 1st and 2nd

Hi All,

My use case is to check the current date, If its 1st and 2nd of every month, User can change this date to last day of month.
if its not 1st and 2nd of every month user can change current value to next day only.

How i can implement this kind of validation in appian..

...

OriginalPostID-94485

OriginalPostID-94485

  Discussion posts and replies are publicly visible

Parents
  • Hi,
    day(ri!date) function is used to get day from given date. daysinmonth(ri!month,ri!year) function is used to get maximum number of days in given month. You can determine today's date is 1st or 2nd using day() function. If it is 1st or 2nd day then last day of the month should be picked else tomorrow (today()+1) should be picked.
    It can be achieved in two ways,
    1) Checking the above mentioned condition after submitting the form and Loop back to the same form.
    2) Use evaluateServerSideExpression which is available under Shared Components, to do this validation before submitting the form. Do keep in mind that it wont work in mobile enabled Form. Given below is the link for this utility:
    forum.appian.com/.../summary
Reply
  • Hi,
    day(ri!date) function is used to get day from given date. daysinmonth(ri!month,ri!year) function is used to get maximum number of days in given month. You can determine today's date is 1st or 2nd using day() function. If it is 1st or 2nd day then last day of the month should be picked else tomorrow (today()+1) should be picked.
    It can be achieved in two ways,
    1) Checking the above mentioned condition after submitting the form and Loop back to the same form.
    2) Use evaluateServerSideExpression which is available under Shared Components, to do this validation before submitting the form. Do keep in mind that it wont work in mobile enabled Form. Given below is the link for this utility:
    forum.appian.com/.../summary
Children
No Data