Hi - I'm struggling to get the right syntax for my select statement.
My users table holds everyone's email address - virtual7 holds the userid for a person's manager. In this formula if the 'manager' has been selected, I'm trying to use virtual 7 (the manager's USERID) to retrieve their matching email address stored in the the user table. If I remove this select from my syntax I get a response, but with this syntax the formula is null. I've tried to troubleshoot this but can't quite fix my code. Any help would be appreciated. Thanks
CASE
WHEN [@field:tbl_opportunities_sign2]="manager" THEN (SELECT Email FROM tbl_users WHERE UserGUID=target.'[@cbParamVirtual7]')
ELSE CAST(‘[@cbParamVirtual9]’ AS CHAR)
END
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
Jodie
Hi - I'm struggling to get the right syntax for my select statement.
My users table holds everyone's email address - virtual7 holds the userid for a person's manager. In this formula if the 'manager' has been selected, I'm trying to use virtual 7 (the manager's USERID) to retrieve their matching email address stored in the the user table. If I remove this select from my syntax I get a response, but with this syntax the formula is null. I've tried to troubleshoot this but can't quite fix my code. Any help would be appreciated. Thanks
CASE
WHEN [@field:tbl_opportunities_sign2]="manager" THEN (SELECT Email FROM tbl_users WHERE UserGUID=target.'[@cbParamVirtual7]')
ELSE CAST(‘[@cbParamVirtual9]’ AS CHAR)
END
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.