Hello all! Hopefully you can help me out
I am trying to pass the following expression into “switch” and keep getting an “end of expression expected” error.
Bcc1 and Bcc2 are variables set to “True” or “False” (not boolean, but a string from an excel file), and rows (1) and (2) are from a datatable (I’m trying to run the switch in a “for each row” activity).
Here is the looong expression:
If (Bcc1=“True"And Bcc2=“True” And row(1).tostring<>”" And row(2).tostring<>“”,“Default”, If(Bcc1=“True” And Bcc2=“True” And row(1).tostring<>“” And row(2).tostring=“”,“1”, If(Bcc1=“True” And Bcc2=“True” And row(1),tostring=“” And row(2).tostring<>“”,“2”,If(Bcc1=“True” And Bcc2=“True” And row(1).tostring=“” And row(2).tostring=“”,“3”,If(Bcc1=“True” And Bcc2=“False” And row(1).tostring<>“” And row(2).tostring<>“”,“4”,If(Bcc1=“True” And Bcc2=“False” And row(1).tostring<>“” And row(2).tostring=“”,“5”,If(Bcc1=“True” And Bcc2=“False” And row(1).tostring=“” And row(2).tostring<>“”,“6”,If(Bcc1=“True” And Bcc2=“False” And row(1).tostring=“” And row(2).tostring=“”,“7”,If(Bcc1=“False” And Bcc2=“True” And row(1).tostring<>“” And row(2).tostring<>“”,““8,If(Bcc1=“False” And Bcc2=“True” And row(1).tostring<>”” And row(2).tostring=“”,“9”,If(Bcc1=“False” And Bcc2=“True” And row(1).tostring=“” And row(2).tostring<>“”,“10”,If(Bcc1=“False” And Bcc2=“True” And row(1).tostring=“” And row(2).tostring=“”,“11”,If(Bcc1=“False” And Bcc2=“False” And row(1).tostring<>“” And row(2).tostring<>“”,“12”,If(Bcc1=“False” And Bcc2=“False” And row(1).tostring<>“” And row(2).tostring=“”,“13”,If(Bcc1=“False” And Bcc2=“False” And row(1).tostring=“” And row(2).tostring<>“”,“14”,“15”)))))))))))))))
I have 16 possible outcomes and really want to get it all done in switch.
If you could take a look at my expression and perhaps tell me where I’m going wrong, I’d rreeaaally appreciate it
Thanks in advance!