I have 3 email lists stored as virtual columns and I want to have 1 (rather than 3) notification workflow which will access the proper list and I am trying to use an expression like this in the To: field of the email task in my workflow to select the proper email list:
[Participant ID].[CONCATENATE("Notify Emails ",
IF([_STATE]=Referral,
"Referral",
IF([_STATE]=Application,
"Application",
"Application Decision",
)
)
)]
However it just blats this text as an email address.
Is it disallowed to calculate a column name like this? If so, where is the documentation on this expression restriction?
Also I noticed a bug, when there is a missing ) inside of the square brackets it does not get flagged when saving the expression (I removed the last closing paren from the same expr as above):
[Participant ID].[CONCATENATE("Notify Emails ",
IF([_STATE]=Referral,
"Referral",
IF([_STATE]=Application,
"Application",
"Application Decision",
)
)
]
Solved! Go to Solution.
Thanks Steve for leading me to the correct solution, I just simply didnโt think to inside-out the expression, here is my solution:
SWITCH(
[_STATE],
"Referral",
[Participant ID].[Notify Emails Referral],
"Application",
[Participant ID].[Notify Emails Application],
[Participant ID].[Notify Emails Application Decision]
)
Nope.
Itโs not a โrestrictionโ. Youโve misunderstood what a dereference is.
Thanks for the quick reply. Thatโs good news that we can compute column names, how would I restructure my expression to do what I need to?
Try:
CONCATENATE(
"Notify Emails ",
SWITCH(
[_STATE],
"Referral",
[Participant ID].[Referral],
"Application",
[Participant ID].[Application],
[Participant ID].[Application Decision]
)
)
I believe you have a misunderstanding of what @Steve had said: you cannot dynamically compute column names. Itโs totally inposibble in terms of many programming and RDBMS reasons.
Thanks Steve for leading me to the correct solution, I just simply didnโt think to inside-out the expression, here is my solution:
SWITCH(
[_STATE],
"Referral",
[Participant ID].[Notify Emails Referral],
"Application",
[Participant ID].[Notify Emails Application],
[Participant ID].[Notify Emails Application Decision]
)
User | Count |
---|---|
35 | |
31 | |
30 | |
18 | |
17 |