Skip to main content

In the works of creating a whole flow to process users and its user groups in the application to communicate to IAM, I am configuring the Web connections. In setting up all endpoints, I’ve added several GET actions to obtain values from lookups which I later use in the actual POST (ex. Create user).

The question now, is there also a way to directly use a Lookup value in the POST instead of needing to find its “id” in intermediate steps?

For example I wish to obtain the “write_back_usr_pref_type_id” by just supplying the name of the configuration.

I may or may not had a similar question ​@Mark_Plaggenborg, that has been answered by ​@Vincent Doppenberg… Windows GUI - indicium task staging resource start_commit end_commit | Thinkwise Community


Hi Mark,

I hope I understood your question correctly, but it is possible by using for instance the following request:

You can find more about this feature here: OData API | Thinkwise Documentation
Look for choose_by_display and choose_by_element

Let me know if it works out for you!

{
"usr_id": "dvdb_tmp",
"first_name": "Dummy",
"gender": {
"choose_by_element": {
"element_transl": "Male"
}
},
"email": "dvdb-dummy@thinkwisesoftware.com",
"authentication_type": {
"choose_by_element": {
"element_transl": "IAM"
}
},
"two_factor_authentication_type": "0",
"write_back_usr_pref_type_id": {
"choose_by_display": {
"display_value": "Move"
}
},
"appl_lang_id": {
"choose_by_display": {
"display_value": "Nederlands"
}
},
"time_zone_id": {
"choose_by_display": {
"display_value": "Etc/GMT-8"
}
}
}

Edit: Small note, instead of the choose_by_element for “authentication_type” you could have used authentication_type : "3" instead, but I just wanted to show it could also be done like this


Thank you both for your quick replies. This was indeed what I had overlooked.

The example makes it even more clear that this is exactly what I needed.
 


Hello ​@Mark_Plaggenborg,

Yes, this is possible, you can do this in your request body (see country_id):

{
"street": "Main street",
"house_number": "123",
"postal_code": "1234AA",
"city": "Main city",
"country_id": {
"choose_by_display": {
"display_value": "Netherlands"
}
}
}

So choose_by_display is a static identifier and so is display_value. The value of the display_value property is the display value of the lookup that you want to set. Indicium will attempt to uniquely look up the key for that display value and if successful, that key will be used for the insert.

I hope this helps.


Oh I see Dick has already answered, I had the page open for a while already 😅.


Reply