I'm facing an issue.
I'm calling an API that returns this response:
Power: List of Dictionary: 2 items
I need to get the Power Value when Unit is equal to "HP".
I created this expression rule (and many others):
ri!Power[fv!index].Unit = "HP",
But when I use it inside a process I get this error:
An error occurred while evaluating expression: power:rule!SBX_GetVehiclePowerValue(pv!response.eurotaxIdentificationResponse.VehicleList.Vehicle.Engine.Power) (Expression evaluation error in rule 'sbx_getvehiclepowervalue' at function a!forEach: Cannot index "Power" because it is an array type (List of SBX_Unit_Value_Type). Only fields with scalar types can be indexed from an array.) (Data Outputs)
When I test my expression rule I use this data and it works:
Any lead to resolve this issue ? Thanks !
Well, it was a problem from the response I get. I had to create a rule to retrieve data from vehicle list
Thanks for your help !
Can you post some more information (i.e. a screenshot maybe) of the structure of the "pv!response" data type? Including how it's nested and what level(s) include array values as opposed to single values.
Discussion posts and replies are publicly visible
© 2020 Appian. All rights reserved.