Constraint to restrict user from selecting specific answers

Hi Community,

I am try ing to develop a form, and I got stuck on a constraint. Please see the attached form, where I need add a conditional statement as the following:

  1. if the difference between the date of enrollment and the current date is greater than 270days = 9months the form will not allow the user to select "9-month regimen" option
  2. if the difference between the date of enrollment and the current date is greater than 730days = 24months the form will not allow the user to select "9-month regimen" or "24-month regimen" option

I tried with a constraint; however, it didn't work. your help will be appreciated.
Thanks,
Imran
pv_chart_review.xlsx (13.0 KB)

1 Like

Hello @A.N.M_AL-IMRAN,
It is not pretty, but it works :).
I am sure, there are many here, you can fix the "if" formula, I could not make it work.

pv_chart_review.xlsx (13.5 KB)

1 Like

@A.N.M_AL-IMRAN I changed the logic you mentioned above but I think this xls may serve your purpose.

In the attached XLS

1)Removed group (because it will not work in collect) and
2)Changed list_name value of "length_of_treatment".

pv_chart_review_arif.xlsx (13.0 KB)

Thanks,
Arif

1 Like

hi @A.N.M_AL-IMRAN

you can try this option too to see if it is okay for you.

pv_chart_review_2.xlsx (47.1 KB)

Thanks
fabla2020@gmail.com

3 Likes

Hi All life savers,

Thanks a lot for all your contributions in resolving my issue. At last, I found the solution on the example of @Fabla.

Thanks again,
Imran

4 Likes