cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AVTS
Post Patron
Post Patron

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
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,902)