The associations are objects, thus DS_Users.departement_id
is an object, not an integer id (despite the name).
The KeyField
should then point to Self
, which holds the department object. The 142207584
is the pointer to the department object. Also note that since you are retrieving users separated from departments, such lookup field will not appear selected when you retrieve data, because the department instance in DS_Users will be different than the one from DS_Departements. More info here: How to create lookup fields using XDataClient? - #6 by wlandgraf.
Also note that if you simply want to display the department name associated with the customer, you can use create a string field with name departement_id.name
(like you did with department_id.department_id
).