I am trying to use the Logic Apps ServiceNow connector.
I have got most of the fields from the request, the last item which i need are the variables text inputs in ServiceNow. I have identified that i can get the information from sc_item_option_mtom table and sc_item_option respectively.
The output of sc_item_option_mtom looks like below -
"result": [
{
"sys_id": "00d1ce4adb75c4144664a27314961454",
"sys_updated_by": "Bot.One",
"sys_created_on": "04/01/2020 12:23:21",
"sys_mod_count": "0",
"request_item": {
"display_value": "RITM0032344",
"link": "https://dev.service-now.com/api/now/v2/table/sc_req_item/ggd1ce4adb75c4144664a2731496195f"
},
"sc_item_option": {
"display_value": "ggd1ce4adb75c4144664a2731496195e",
"link": "https://dev.service-now.com/api/now/v2/table/sc_item_option/ggd1ce4adb75c4144664a2731496195e"
},
"sys_updated_on": "04/01/2020 12:23:21",
"sys_tags": "",
"sys_created_by": "Bot.One"
}
]
I need to get sc_item_option.display_value to be used as a input into the sc_item_option table. When i do this in Logic apps, it create a for each loop(which is correct), but the option i get is a Dependent Item
When i run the logic app the Dependent Item looks like -
"sys_id={\"display_value\":\"ggd1ce4adb75c4144664a2731496195e\",\"link\":\"https://dev.service-now.com/api/now/v2/table/sc_item_option/ggd1ce4adb75c4144664a2731496195e"}"},
I've tried editing the code to just get the display_value. Things i have tried are -
- sc_item_option.display_value.[0]
- sc_item_option.display_value[0]
- sc_item_option.[0]
- sc_item_option[0]
Nothing seems to work and not give me the value which is in display_value.
Can someone help me and tell me what i am doing wrong ?
Full List Records file -
"result": [
{
"sys_id": "00d1ce4adb75c4144664a27314961454",
"sys_updated_by": "Bot.One",
"sys_created_on": "04/01/2020 12:23:21",
"sys_mod_count": "0",
"request_item": {
"display_value": "RITM0032344",
"link": "https://yarratramsau.service-now.com/api/now/v2/table/sc_req_item/ggd1ce4adb75c4144664a2731496195f"
},
"sc_item_option": {
"display_value": "ccd1ce4adb75c4144664a2731496195e",
"link": "https://yarratramsau.service-now.com/api/now/v2/table/sc_item_option/ggd1ce4adb75c4144664a2731496195e"
},
"sys_updated_on": "04/01/2020 12:23:21",
"sys_tags": "",
"sys_created_by": "Bot.One"
},
{
"sys_id": "0cd1ce4adb75c4144664a27314961960",
"sys_updated_by": "Bot.One",
"sys_created_on": "04/01/2020 12:23:21",
"sys_mod_count": "0",
"request_item": {
"display_value": "RITM0032344",
"link": "https://yarratramsau.service-now.com/api/now/v2/table/sc_req_item/ggd1ce4adb75c4144664a2731496195f"
},
"sc_item_option": {
"display_value": "4fd1ce4adb75c4144664a2731496195e",
"link": "https://yarratramsau.service-now.com/api/now/v2/table/sc_item_option/4fd1ce4adb75c4144664a2731496195e"
},
"sys_updated_on": "04/01/2020 12:23:21",
"sys_tags": "",
"sys_created_by": "Bot.One"
},
{
"sys_id": "c0d1ce4adb75c4144664a27314961960",
"sys_updated_by": "Bot.One",
"sys_created_on": "04/01/2020 12:23:21",
"sys_mod_count": "0",
"request_item": {
"display_value": "RITM0032344",
"link": "https://yarratramsau.service-now.com/api/now/v2/table/sc_req_item/ggd1ce4adb75c4144664a2731496195f"
},
"sc_item_option": {
"display_value": "40a1ce4adb75c4144664a2731496195f",
"link": "https://yarratramsau.service-now.com/api/now/v2/table/sc_item_option/40a1ce4adb75c4144664a2731496195f"
},
"sys_updated_on": "04/01/2020 12:23:21",
"sys_tags": "",
"sys_created_by": "Bot.One"
}
]