When I select Visit1 from the “Select Visit” list and provide any given date, it should add five (5) days to the Date.
When Visit2, Visit3 or Visit6 is selected, it adds five (5) days to the selected Date.
40 days is added to Visit4 and Visit7
169 days added to Visit5
351 days added to Visit8
I have written an “if” statement but I only get the last part of my code working. I need help.
Thank you.
Note! Visit1 to Visit9 is a dropdown list Sample Work.xlsx (8.5 KB)
You do not need the date function inside the if and in an if argument a function does not need accents. Also, a variable should start with lower case. A simplified functional version of your condition is
@Logout.
Write something like this based on your needs
if(selected(${visit},'1'),date-time(decimal-date-time(${date})+90),
if(selected(${visit},'2'),date-time(decimal-date-time(${date})+180),
if(selected(${visit},'3'),date-time(decimal-date-time(${date})+270),
if(selected(${visit},'7'),date-time(decimal-date-time(${date})+365),
if(selected(${visit},'4'),date-time(decimal-date-time(${date})+450),
if(selected(${visit},'5'),date-time(decimal-date-time(${date})+540),
if(selected(${intmonth},'6'),date-time(decimal-date-time(${date})+630),'None')))))))