Showing results for 
Search instead for 
Did you mean: 

Assignments to field of type 'Lookup'

0 Kudos

In my main table I have a field A that is a lookup to LookupTableA. That LookupTableA has a field AB that is a lookup to LookupTableB.

The main table also has a field B that is a lookup to LookupTableB.

When importing new data only the value for field A is provided and I want to fill field B with an assignment that uses the information present in LookupTableA.

What I tried to do is the following assignment:

IF(IS_NULL(B.\[Record\]), A.AB.\[Record\])

This assignment checks whether or not B is already filled and if not tries to fill it with the lookup record of the linked LookupTableA entry.

Sadly that assignment returns an error. Is there something wrong in my assignment?

It works if I use a fixed entry from LookupTableB like this:

IF(IS_NULL(B.\[Record\]), B \[xyz\])

It seems strange that the first version does not work, although it also points to a specific entry in LookupTableB.

Would be glad if anybody has some thoughts on how to achieve that more dynamic assignment described above.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Martin,

Unfortunately, this is not possible.

Rightly said by you, I don't understand why adding an ELSE clause that will not be executed in my case should help. as suggested by Ravi would not help here.

I tried it at my end, rightly said by you Sadly that assignment returns an error. I am getting below error:

Assignment operation failed: A runtime error occured while evaluating an assignment, validation or calculated field.

See this assignment works if B field in main table is of Type Text not lookup field:

IF(IS_NULL(B), A.AB.[Record])

So as per your requirement only way to achieve it as you said IF(IS_NULL(B.[Record]), B [xyz]), I mean in this way your expression become really bigger but can be achieved, say your look up table LookupTableB has 30 values. I am taking example with 2 records, similarly you can do it for 30 values and even more. Say your table has 2 values as XYZ and ABC.

IF(IS_NULL(B.[Record]) AND A.AB.[Record]= B [XYZ] , B [XYZ],

IS_NULL(B.[Record]) AND A.AB.[Record]= B [ABC], B [ABC] )

Unfortunately, we don't have any other option except writing this huge expression using MDM Data Manager. Other option you can try by making use of MDM JAVA APIs which need effort to create this application.


Mandeep Saini

Former Member
0 Kudos

Hi Martin

Try using IF Then ELSE instead of IF Then.

This might resolve the problem.


0 Kudos

I don't understand why adding an ELSE clause that will not be executed in my case should help.

I tried it anyway but with no success.

Former Member
0 Kudos

Hi ,

I also face same situation.

I found that we cant assign values in field that is lookup ttype ather than lookup value.

As in yr case happening when u assgin B [xyz] to field B as it is lookup to lookup table B.

if same assignemnt u apply for field (display field type of lookuptable B) then this assignment will work.

I dont think by making field B of type lookuptable is possible.