Jump to content
We've recently updated our Privacy Statement, available here ×

Lookups as Calculated Fields


rroberts_2

Recommended Posts

Hi guys,

I'm working in Domain Designer and I'm trying to pull from a lookup table and I'm pretty sure I can do it via Calculated Fields tab.  We have a ton of lookups that all come out of the same table and are differentiated with a LOOKUP_CODE attribute.  I've figured out how to make the correct results display but I have to create a derived table for each field which seems like I'm doing it wrong.  Bare with me as we're quite new to this and I'm trying to become our SME.

Example:

Table: Lookups

LOOKUP_TYPELOOKUP_ENUMLOOKUP_NAME
approval_state10Completed
approval_state20Approved
capacity_type10Strategic
capacity_type20Tactical

Table: Projects

Project_IDApproval_StateCapacity_Type
PR0123451020
PR0234562020

Based on the wiki, it would appear that using the Domain Expression Langugage, I would need a calcualted field with Lookups.LOOKUP_NAME where Lookups.LOOKUP_TYPE == 'approval_state' and Projects.Approval_State == Lookups.LOOKUP_ENUM should work, but I can't get it to give me any messages aside from Cannot evaluate expression.  Any help is greatly appreciated.

 

-Thanks!

Ronnie Roberts - DIRECTV

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Per a suggestion, I have also tried running this with the following:


  1. Lookups.NAME where Lookups.LOOKUP_ENUM = [Projects].DTV_APR_STATE and Lookups.LOOKUP_TYPE = 'DTV_APR_STATE'
  2. Lookups.NAME where (Lookups.LOOKUP_ENUM = [Projects].DTV_APR_STATE and Lookups.LOOKUP_TYPE = 'DTV_APR_STATE')
  3. Lookups.NAME where (Lookups.LOOKUP_ENUM = [Projects].DTV_APR_STATE and (Lookups.LOOKUP_TYPE = 'DTV_APR_STATE'))
  4. Lookups.NAME where Lookups.LOOKUP_ENUM == [Projects].DTV_APR_STATE and Lookups.LOOKUP_TYPE == 'DTV_APR_STATE'
  5. Lookups.NAME where (Lookups.LOOKUP_ENUM == [Projects].DTV_APR_STATE and Lookups.LOOKUP_TYPE == 'DTV_APR_STATE')
  6. Lookups.NAME where (Lookups.LOOKUP_ENUM == [Projects].DTV_APR_STATE and (Lookups.LOOKUP_TYPE == 'DTV_APR_STATE'))

 


The only thing I can ever get to show up Cannot evaluate expression, which is not particularly helpful.  Does anyone perhaps have a working "Calculated Field" from a lookup they would be willing to post the expression for?


 


-Ronnie


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...