我正在尝试使用逻辑应用 ServiceNow 连接器。
我从请求中获得了大部分字段,我需要的最后一项是 ServiceNow 中的变量文本输入。我已经确定我可以分别从sc_item_option_mtom表和sc_item_option获取信息。
sc_item_option_mtom的输出如下所示 -
"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"
}
]
我需要将sc_item_option.display_value用作 sc_item_option 表的输入。当我在逻辑应用程序中执行此操作时,它会为每个循环创建一个(这是正确的),但我得到的选项是一个从属项
当我运行逻辑应用程序时,从属项看起来像 -
"sys_id={\"display_value\":\"ggd1ce4adb75c4144664a2731496195e\",\"link\":\"https://dev.service-now.com/api/now/v2/table/sc_item_option/ggd1ce4adb75c4144664a2731496195e"}"},
我尝试编辑代码以获取 display_value。我尝试过的事情是 -
- sc_item_option.display_value.[0]
- sc_item_option.display_value[0]
- sc_item_option.[0]
- sc_item_option[0]
似乎没有任何效果,也没有给我 display_value 中的值。
有人可以帮助我并告诉我我做错了什么吗?
完整列表记录文件 -
"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"
}
]