Jump to content
  • 0

Selecting a matching value from a second table in a calculation



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

WHEN [@field:tbl_opportunities_sign2]="manager" THEN (SELECT Email FROM tbl_users WHERE UserGUID=target.'[@cbParamVirtual7]')
ELSE CAST(‘[@cbParamVirtual9]’ AS CHAR)

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

It's currently set as a text field that reads in a data source field that stores the correct email address. It's odd that I can get it to read virtual 9 correctly if I use a WHEN statement but not for the ELSE.

Link to comment
Share on other sites

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.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...