on 07-19-2012 3:51 PM
Hi all,
i need to write an assignment
1) need to pick the value from a field, lets say its value is 10.
2) need to look for the code in the below looup table in the repository and pick up a corresponding description "abc" and populate in
my assignment field.
H Lookup table
code desc
10 abc
20 sow
30 cre
rgds,
ve
Hi Veena,
You can write assignment expression like given below:
IF(Code.[Record]=Lookup.Code,"",Lookup.desc)
You need to choose the required field as Assignment Field to which you want to assign this value of Description.
This assignment will check if value of Code in record matches with any value of code in the Lookup table and then will assign value of corresponding Description to the field mentioned as Assignment field.
Kindly run this assignment and let me know in case of any issues.
This should solve your problem.
Thanks and Regards,
Ankush Bhardwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Veena,
Above expression is working for me and assigning correct description wherever the code matches.
Can you please let me know the Main Table field name(whose value is 10 and needs to be compared), Lookup table name, lookup table field names(which you mentioned as code and desc)?
May be i would be able to provide you the exact expression to be used. Thank you.
Regards,
Ankush Bhardwaj
HI Veena/Ankush,
My query to both of you (i am having same problem)MDM version 7.1 SP08
Main table field: Machinename type text
Exportcode type text.
Lookup table in repo Machinedetails having fields and values:
Machines MachinesCode
A 123
B 456
C 789
My query is i want to write an assignment that will look machine name in this lookup table and populate code in my Exportcode field.
As per your suggestion Ankush, IF(Code.[Record]=Lookup.Code,"",Lookup.desc)
how can i put Lookup.code as it will not be available in lookup dropdown (as my lookup table is not a part of main table ) and how veena you resolved your problem...as when it is not available in assignment if oyu have written manually.
Please help me.
thanks in advance
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.