Best answer

Private Application Action Creation with custom dictionary field that will allow a list of objects?

  • 25 January 2023
  • 1 reply
  • 35 views

We are trying to set up an connection to our external api. The api endpoint has a parameter that needs to be a array of objects.
i.e. -
 

"OperationCodes": [
{
"Opcode": "sample string 1",
"Desc": "sample string 2",
"LongDesc": "sample string 3",
"TechDesc": "sample string 4",
"CategoryCode": "sample string 5",
"EstimatedParts": 1.0,
"EstimatedLabor": 1.0,
"EstimatedLaborHours": 1.0,
"EstimatedFreight": 1.0,
"EstimatedEquipment": 1.0,
"EstimatedSublet": 1.0,
"EstimatedMileage": 1.0,
"EstimatedMiscSupply": 1.0,
"EstimatedBillCodes": 1.0,
"Approved": true,
"FlatRateAmount": 1.0,
"FlatRatePerFootRate": 1.0,
"FlatRatePerFootMethod": "sample string 6",
"LaborFinished": true,
"StandardHours": 1.0,
"EstCompDate": "sample string 8",
"EstStartDate": "sample string 9",
"CustPromiseDate": "sample string 10",
"ForecastedPartsCharges": 1.0,
"ForecastedLaborCharges": 1.0,
"ForecastedLaborHours": 1.0
},
{
"Opcode": "sample string 1",
"Desc": "sample string 2",
"LongDesc": "sample string 3",
"TechDesc": "sample string 4",
"CategoryCode": "sample string 5",
"EstimatedParts": 1.0,
"EstimatedLabor": 1.0,
"EstimatedLaborHours": 1.0,
"EstimatedFreight": 1.0,
"EstimatedEquipment": 1.0,
"EstimatedSublet": 1.0,
"EstimatedMileage": 1.0,
"EstimatedMiscSupply": 1.0,
"EstimatedBillCodes": 1.0,
"Approved": true,
"FlatRateAmount": 1.0,
"FlatRatePerFootRate": 1.0,
"FlatRatePerFootMethod": "sample string 6",
"LaborFinished": true,
"StandardHours": 1.0,
"EstCompDate": "sample string 8",
"EstStartDate": "sample string 9",
"CustPromiseDate": "sample string 10",
"ForecastedPartsCharges": 1.0,
"ForecastedLaborCharges": 1.0,
"ForecastedLaborHours": 1.0
}
]

What would be the best way to set this up? Is there a better field to use other than dictionary?

icon

Best answer by webinstinct 26 January 2023, 15:57

View original

1 reply

For all that come to this we were able to solve this by not using a dictionary but instead a text field. We have a comma separated list of strings (used as operation code ids).

In the “code view” we manipulated the inputData field and formatted the comma separated string as a list of objects.

Reply