You try using a flowchart. 1st sequence add steps to get date from the terminal, Assign it to string variable for eg let it be “str_terminaldate”. Add 3 flow decision to check the dates and add steps to be performed accordingly. Condition for flow decision is as below-
Current Date Condition - convert.toDatetime(str_terminaldate).tostring(“dd/MM/yyyy”) = now.tostring(“dd/MM/yyyy)”
-1 Date Condition - convert.toDatetime(str_terminaldate).tostring(“dd/MM/yyyy”) = now.AddDays(-1).tostring(“dd/MM/yyyy)”
+1 Date Condition - convert.toDatetime(str_terminaldate).tostring(“dd/MM/yyyy”) = now.AddDays(+1).tostring(“dd/MM/yyyy)”
In general, it’s possible. However it depends on requirement whether Switch is better solution or not.
For example, if this process in a loop, we can set Break or Continue activity to skip the following process in 0,1 and default case. But we can write it using If activity, too.
yes this process will continue as loop, like if -1 data not having value it need to check for 0 value. if 0 value also not having data it need to check in +1 date.
yes this process will continue as loop, like if -1 data not having value it need to check for 0 value. if 0 value also not having data it need to check in +1 date.
I didn’t understand your requirement 100%, however the following might help you.