CMDBuild Forum

Lookup Values Returns Id

Hi!

I having hard time to figure how I will return the value from a lookup. I only get the Id instead of the actual value. Any chance you can help me?

When I chose 002 - ADMIN - Maintenance from lookup, the return value I get from the js code I created are only Id’s of the Lookup table.

autoValue-location

location

I need the actual value because from there I will parse an Asset/Property code from different fields. Hope you can help me. Thank you in advance.

Hello,
Try with:

api.getLookupCode(‘Location’);
api.getLookupDescription(‘Location’)

Thank you for that. Yes it works!