cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AVTS
Helper V
Helper V

Purchase Order Parsing (Header & Line Items) - Canvas App

Team,

 

I am struggling to retreive the Purchase order line items from collections. Attempted with various way but unsure where and what need be changed. Please add your suggestions.

Below is the post man output.

Screenshot

-----------------------------------------------------------------------------

AVTS_0-1623824181865.png

------------------------------------------------------------------------------

Output for the same.

{
"poNumber": "4500002163",
"company": "3456",
"changedOn": "2014-06-17",
"createdBy": "mahehehe",
"purchaseOrg": "1172",
"vendor": "0010000189",
"poLines": [
{
"poNumber": "4500002163",
"lineNo": "00010",
"material": "1220300150036B",
"shortText": "Edwer 46.5g Wlre Edce",
"materialGroup": "20200",
"plant": "E010",
"stoLocation": "",
"moveType": "101",
"quantity": "500.000",
"bom": "EA",
"poRcvdQty": "500.000",
"matDocNumber": "5000000761",
"matDocYear": "2014",
"matDocItem": "0001",
"changedOn": "2014-06-17"
}
],
"bapiRreturn": []
}

---------------------------------------------------------------------------------------

 

JSON schema

 

{
    "type""object",
    "properties": {
        "poNumber": {
            "type""string"
        },
        "company": {
            "type""string"
        },
        "changedOn": {
            "type""string"
        },
        "createdBy": {
            "type""string"
        },
        "purchaseOrg": {
            "type""string"
        },
        "vendor": {
            "type""string"
        },
        "poLines": {
            "type""array",
            "items": {
                "type""object",
                "properties": {
                    "poNumber": {
                        "type""string"
                    },
                    "lineNo": {
                        "type""string"
                    },
                    "material": {
                        "type""string"
                    },
                    "shortText": {
                        "type""string"
                    },
                    "materialGroup": {
                        "type""string"
                    },
                    "plant": {
                        "type""string"
                    },
                    "stoLocation": {
                        "type""string"
                    },
                    "moveType": {
                        "type""string"
                    },
                    "quantity": {
                        "type""string"
                    },
                    "bom": {
                        "type""string"
                    },
                    "poRcvdQty": {
                        "type""string"
                    },
                    "matDocNumber": {
                        "type""string"
                    },
                    "matDocYear": {
                        "type""string"
                    },
                    "matDocItem": {
                        "type""string"
                    },
                    "changedOn": {
                        "type""string"
                    }
                },
                "required": [
                    "poNumber",
                    "lineNo",
                    "material",
                    "shortText",
                    "materialGroup",
                    "plant",
                    "stoLocation",
                    "moveType",
                    "quantity",
                    "bom",
                    "poRcvdQty",
                    "matDocNumber",
                    "matDocYear",
                    "matDocItem",
                    "changedOn"
                ]
            }
        },
        "bapiRreturn": {
            "type""array"
        }
    }
}
-----------------------------------------------------------------------------
Below is the power app screen, which has button and inputtext and datatable.
 
Button formula :
 ClearCollect(googlepo1,getpo.Run(TextInput10.Text))
inputtext : po no
datatable : datasource is collection name
 
Issue here is Datatable add field is not showing in PO line items indiviualy instead it shows only polines
 
AVTS_1-1623824484936.png

Very unsure is this releated to JSON schema issue or Datatable items issue so on.

 

Below is the screenshot of polines selection in datatable.

AVTS_2-1623824755013.png

 

 please advise where and what i am missing to get the PO lines properly.

Expected output in Datatable follows,

AVTS_3-1623824897573.png

 

 

 

 

 
0 REPLIES 0

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,838)