Hello all,
I'm having difficulty with the flow that I have built in the below thread (PowerApps forum).
I'll copy and past the initial post below for your help and consideration.
Hi all,
ISSUE & Executive Summary: Not sure how to output multiple nested arrays from REST API from Flow. The Schema is working fine without errors when running in flow, but it is the JSON Parse function that I am probably getting confused here and missing some steps, but just cannot find the right articles nor have the full understanding of where I am going wrong.
3 x Nested Arrays in the one API response.
Can parse main body of JSON and make dynamic content. I have read, watched and trialled for a number of days to get the nested arrays parsed into PowerApps as a ClearCollect but the best result I can get so far is "value: true" as the whole collection.
Below is my current flow set up and an example API response. The different sections are:
lines (transaction information - many products to one Sales Order so this will repeat itself).
extrafields (within the lines/transactions - information like whether or not this particular item is not meant to be delivered, for example)
debtor information (customer delivery details)
extrafields (extra information in relation to the transaction as a whole - the balance of payment outstanding, for example)
I parse the HTTP JSON and get the main body information of the transaction header just fine. That can then be dynamic content that I can select and manipulate within Flow.
I have then got another step, Parse JSON on each ITEM. The output dialog box of the Flow shows correct values and does not present an error message. However, I see no dynamic content throughout the rest of the flow from this particular step (which runs Apply to Each too).
Same goes with EXTRAFIELDS as the above step.
I am then not sure about how I am supposed to have the JSON parse fields from above become inputs into RESPOND. All examples/tutorials I have been able to find seem to only deal with the output of one JSON parse, not multiple.
Once I have figured out and understood where I am going wrong here, I am pretty certain that I will be able to automate about half of my business, so your help is really appreciated!
{
"debtorid": 24635,
"lines": [
{
"stockcode": "SZSLE144637",
"isoriginatedfromtemplate": false,
"orderquantity": 1.0,
"discount": 0.0,
"unitprice": 2398.0,
"ispriceoverridden": true,
"locationid": 2,
"taxrateid": 10,
"listprice": 3999.0,
"pricepolicyid": 0,
"linetype": 0,
"uninvoicedquantity": 0.0,
"releasequantity": 1.0,
"releasenowquantity": 0.0,
"lastreleasedquantity": 0.0,
"pickedquantity": 0.0,
"picknowquantity": 2.0,
"lastpickedquantity": 0.0,
"stocktype": "PhysicalItem",
"id": 302453,
"branchid": 1,
"taxratevalue": 10.0,
"istaxoverridden": false,
"taxoverridevalue": 0.0,
"narrative": null,
"backorderquantity": 0.0,
"description": "PRODUCT1",
"batchcode": "",
"duedate": "2019-12-27",
"linetotal": 387465
"invoicedquantity": 1.0,
"invoicenowquantity": 0.0,
"lastinvoicedquantity": 3.0,
"suppliedquantity": 1.0,
"supplynowquantity": 0.0,
"lastsuppliedquantity": 2.0,
"restrictedline": false,
"rankorder": 1,
"extrafields": [
{
"key": "X_SOLD_STICKER_PRINTED",
"value": "N"
},
{
"key": "X_DO_NOT_DELIVER",
"value": "N"
},
{
"key": "X_ALLOC_DATE",
"value": "Dec 15 2019 6:09PM"
},
{
"key": "X_SALE_DATE",
"value": "2019-10-26"
},
{
"key": "X_DEPOSIT_DATE",
"value": "2019-10-26"
},
{
"key": "X_PRIORITY_RELEASE",
"value": "N"
},
{
"key": "X_QFF_PT_EARNED",
"value": 374865
},
{
"key": "X_QFF_BONUS_PT",
"value": 0.0
},
{
"key": "X_QFF_PT_MULTIPLIER",
"value": 1.0
},
{
"key": "X_QFF_DEF_MULTIPLIER",
"value": 1.0
}
]
},
{
"stockcode": "AUTOFREIGHT",
"isoriginatedfromtemplate": false,
"orderquantity": 1.0,
"discount": 0.0,
"unitprice": 60.0,
"ispriceoverridden": true,
"locationid": 2,
"taxrateid": 10,
"listprice": 0.0,
"pricepolicyid": 0,
"linetype": 0,
"uninvoicedquantity": 0.0,
"releasequantity": 1.0,
"releasenowquantity": 0.0,
"lastreleasedquantity": 0.0,
"pickedquantity": 0.0,
"picknowquantity": 0.0,
"lastpickedquantity": 0.0,
"stocktype": "LookupItem",
"id": 302454,
"branchid": 1,
"taxratevalue": 10.0,
"istaxoverridden": false,
"taxoverridevalue": 0.0,
"narrative": null,
"backorderquantity": 0.0,
"description": "DELIVERY FEE (Installation NOT included)",
"batchcode": "",
"duedate": "2019-12-27",
"linetotal": 123456.0
"invoicedquantity": 1.0,
"invoicenowquantity": 0.0,
"lastinvoicedquantity": 3.0,
"suppliedquantity": 1.0,
"supplynowquantity": 0.0,
"lastsuppliedquantity": 2.0,
"restrictedline": false,
"rankorder": 2,
"extrafields": [
{
"key": "X_SOLD_STICKER_PRINTED",
"value": null
},
{
"key": "X_DO_NOT_DELIVER",
"value": "N"
},
{
"key": "X_ALLOC_DATE",
"value": null
},
{
"key": "X_SALE_DATE",
"value": "2019-10-26"
},
{
"key": "X_DEPOSIT_DATE",
"value": "2019-10-26"
},
{
"key": "X_PRIORITY_RELEASE",
"value": "N"
},
{
"key": "X_QFF_PT_EARNED",
"value": 0.0
},
{
"key": "X_QFF_BONUS_PT",
"value": 0.0
},
{
"key": "X_QFF_PT_MULTIPLIER",
"value": 0.0
},
{
"key": "X_QFF_DEF_MULTIPLIER",
"value": 0.0
}
]
},
{
"stockcode": "PL7681128",
"isoriginatedfromtemplate": false,
"orderquantity": 1.0,
"discount": 0.0,
"unitprice": 60.0,
"ispriceoverridden": true,
"locationid": 2,
"taxrateid": 10,
"listprice": 104.99,
"pricepolicyid": 0,
"linetype": 0,
"uninvoicedquantity": 0.0,
"releasequantity": 1.0,
"releasenowquantity": 0.0,
"lastreleasedquantity": 0.0,
"pickedquantity": 0.0,
"picknowquantity": 2.0,
"lastpickedquantity": 0.0,
"stocktype": "PhysicalItem",
"id": 302455,
"branchid": 1,
"taxratevalue": 10.0,
"istaxoverridden": false,
"taxoverridevalue": 0.0,
"narrative": null,
"backorderquantity": 0.0,
"description": "PRODUCT2",
"batchcode": "",
"duedate": "2019-12-27",
"linetotal": 12356478
"invoicedquantity": 1.0,
"invoicenowquantity": 0.0,
"lastinvoicedquantity": 3.0,
"suppliedquantity": 1.0,
"supplynowquantity": 0.0,
"lastsuppliedquantity": 2.0,
"restrictedline": false,
"rankorder": 3,
"extrafields": [
{
"key": "X_SOLD_STICKER_PRINTED",
"value": "N"
},
{
"key": "X_DO_NOT_DELIVER",
"value": "N"
},
{
"key": "X_ALLOC_DATE",
"value": "Dec 17 2019 10:11AM"
},
{
"key": "X_SALE_DATE",
"value": "2019-10-26"
},
{
"key": "X_DEPOSIT_DATE",
"value": "2019-10-26"
},
{
"key": "X_PRIORITY_RELEASE",
"value": "N"
},
{
"key": "X_QFF_PT_EARNED",
"value": 2983456
},
{
"key": "X_QFF_BONUS_PT",
"value": 0.0
},
{
"key": "X_QFF_PT_MULTIPLIER",
"value": 1.0
},
{
"key": "X_QFF_DEF_MULTIPLIER",
"value": 1.0
}
]
}
],
"taxrounding": 0.01,
"deliverycount": 2,
"invoicecount": 3,
"pickedcount": 0,
"releasecount": 1,
"hasuninvoiced": false,
"hasunpicked": true,
"hasunreleased": false,
"hasunsupplied": false,
"allowcustomerordernumber": false,
"customerordernumber": "",
"accountname": "JOHN SMITH",
"istaxinclusive": true,
"hasbackorders": false,
"branchid": 1,
"defaultlocationid": 2,
"narrative": "Customer would prefer and AM delivery if possible please. ",
"currencyid": 0,
"contactid": -1,
"salespersonid": 3369,
"exchangerate": 1.0,
"taxtotal": 228.91,
"subtotal": 2289.09,
"reference": "31 OF DECEMBER DEL",
"instructions": null,
"createdate": "2019-10-26T11:16:43+11:00",
"orderdate": "2019-10-26",
"duedate": "2019-12-31",
"finalisationdate": "2020-01-02T10:18:38+11:00",
"activationdate": "2019-10-26T11:16:43+11:00",
"deliveryaddress": {
"line1": "",
"line2": "1 MAIN ROAD",
"line3": "",
"line4": "MELBOURNE",
"line5": "3000",
"line6": "0400000"
},
"status": 2,
"statusdescription": "Fully supplied and invoiced",
"finalised": 0,
"ordertotal": 2518.0,
"localvalue": 2289.09,
"hasrestrictedline": false,
"lastupdated": "2020-01-02T10:18:38.737+11:00",
"extrafields": [
{
"key": "X_DELIVERY_STATUS_SEQNO",
"value": 7
},
{
"key": "MANIFEST",
"value": -1
},
{
"key": "X_CUST_PHONE",
"value": "0402533731"
},
{
"key": "X_OVERRIDE_SALESNO",
"value": -1
},
{
"key": "X_DELIVERY_SLOT",
"value": -1
},
{
"key": "X_PICKUP",
"value": "N"
},
{
"key": "X_PICKUP_LOCATION",
"value": -1
},
{
"key": "X_PICKUP_DATE",
"value": "2019-10-26"
},
{
"key": "X_DEPOSIT_VAL",
"value": 2518.0
},
{
"key": "X_BALANCE",
"value": 0.0
},
{
"key": "X_CANCEL_ORDER",
"value": "N"
},
{
"key": "X_QFF_MEMBERID",
"value": "1946466214"
},
{
"key": "X_QFF_SURNAME",
"value": "WHITTEN"
},
{
"key": "X_QFF_VALIDATED",
"value": "N"
},
{
"key": "X_UPD_MEMBERSHIP_DETAILS",
"value": " "
},
{
"key": "X_UPDATE_QFF_PT_EARNED",
"value": " "
}
],
"id": 24167,
"href": "http://###.###.###/salesorder/24167"


Report
All responses (
Answers (