How to put a if condition in assign activity?

Hi, I don’t want to create a series of if activities, that’s why I want to put one long if condition inside an assign activity. But I dpn’t know the exact syntax.

I want to create something like this:

Assign: variable = If(T_Cell = T1) then select(dtT1) else if(T_Cell = T2) then select(dtT2) else if(T_Cell = T3) then select(dtT3) …

Hi,

You can nest if’s like this:
variable = if(T_cell=T1, dtT1, if(T_Cell=T2, dtT2, if(T_Cell=T3,dtT3, dtT4)))

Hope this works for you

1 Like

It worked. Thank you for your help!

I have one more question. How can I leave the last else as empty ? Is it function “Nothing” ?

Yes, it can be:
if(T_cell=T1, dtT1, if(T_Cell=T2, dtT2, if(T_Cell=T3,dtT3, Nothing)))

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.