"item" type in API Response
AnsweredI am calling an API from an auto lookup. The API passes back all string values as you can see here from the definition in Postman; the circled properties are the ones I am having issues with:
In AgilePoint, when I try to map the Response data from the API to my form controls (which are text boxes), it shows equipment_id as type "Item" and when I map it, its a red line instead of a green line.
Clearly from the screenshot of the API definition, its a string type. Why is AgilePoint interpreting it as type "Item". It does this on both the equipment_id and the equip_desc.
how can I correct this?
Thanks!
-
This is the sample:
{
"name": "func_loc_equipment_api_src",
"elements": [
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF",
"fnloc_desc": "DIAMINE REFINING SECTION",
"super_fnloc_id": "VTX-HMD",
"sup_fnloc_desc": "VICTORIA PLANT DIAMINE",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-ACL",
"fnloc_desc": "REF AIR COOLER SYSTEM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-AQN",
"fnloc_desc": "REF AQUA NH3 RECOVERY SYSTEM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-AQW",
"fnloc_desc": "REF AQUA WASTE TANK SYSTEM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-HPS",
"fnloc_desc": "REF PIPING SYSTEM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-HRR",
"fnloc_desc": "REF HMD BLENDING SYSTEM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-HWL",
"fnloc_desc": "REF HOTWELL SYSTEM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-ICP",
"fnloc_desc": "REF BLDG ICPS",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-LPA",
"fnloc_desc": "REF LOW PRESS NH3 SYSTEM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-N11",
"fnloc_desc": "REF N112 SYS",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-PTF",
"fnloc_desc": "REF 509 HMD PRIMARY TANK FARM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-RBL",
"fnloc_desc": "REF BARGE LOADING SYSTEM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-RCO",
"fnloc_desc": "REF REFINER SYSTEM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-REA",
"fnloc_desc": "REF ANALYZER SYSTEM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-RFS",
"fnloc_desc": "REF FORESHOTS SYSTEM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-RPC",
"fnloc_desc": "REF PURGE CONCENTRATOR SYSTEM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-RPE",
"fnloc_desc": "REF PURGE ENRICHER SYSTEM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-RPP",
"fnloc_desc": "REF PARALLEL PURGE SYSTEM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-RPS",
"fnloc_desc": "REF PURGE SYSTEM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-RSU",
"fnloc_desc": "REF BUILDING SERVICES",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-RTC",
"fnloc_desc": "REF TAILS CONCENTRATOR SYSTEM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-RTL",
"fnloc_desc": "REF HMD REFINING TRUCK LOADING SYSTEM",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-SPR",
"fnloc_desc": "REF HMD SPARE EQUIPMENT",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
},
{
"plant_id": "4124",
"func_loc_id": "VTX-HMD-REF-VAM",
"fnloc_desc": "REFINING VAMs",
"super_fnloc_id": "VTX-HMD-REF",
"sup_fnloc_desc": "DIAMINE REFINING SECTION",
"plant_section_id": "HMD",
"section_responsb": "HMD",
"equipment_id": "",
"equip_desc": ""
}
],
"links": [
{
"rel": "self",
"href": "XXXXXXXXXXXXXXX/server/pm_data_services/func_loc_equipment_api/views/func_loc_equipment_api_src?$filter=(super_fnloc_id+%3D+'VTX-HMD-REF'+and+equipment_id+%3D+'')+or+(func_loc_id+%3D+'VTX-HMD-REF')&$orderby=func_loc_id+ASC,equipment_id+ASC"
}
]
} -
Loren,
Red line indicates that AgilePoint will not be able to handle this type of data assignment from left side property to right side.
Green line indicates, no data Conversion is required.
Blue line indicates data is compatible but AgilePoint knows how to convert the data from one type to another. eg String to Number. or Sting to Boolean.
-
Harish - Yes I understand what the red line means. But I am just saying that even though the mapping tool flags the data assignment as an error (with a red line), sometimes the mapping will still work if you publish and test the application. I think this is a perfect example of that because it appears that the red line is appearing in Sylvia's case because the simulation brought back an empty string. As you pointed out, if you put data into the empty string in the simulation response, then the mapping is no longer flagged as an error.
I tend to agree with her that this seems like a bug in the mapping tool.
Please sign in to leave a comment.
Comments
8 comments