cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
guyinkalamazoo
Helper III
Helper III

JSON to SharePoint Create Item help needed

I have the following json schema and it is creating the proper json file needed

{
    "type": "array",
    "items": {
        "type":"object",
        "properties": {
            "Order Key": {
                "type": ["string","null"]
            },
            "Omar Order Number": {
                "type": ["string","null"]
            },
            "Order Type Key": {
                "type": ["string","null"]
            },
            "MAT Type Key": {
                "type": ["string","null"]
            },
            "Order Plant": {
                "type": ["string","null"]
            },
            "Omar Status Code": {
                "type": ["string","null"]
            },
            "MDSI  Job Code": {
                "type": ["string","null"]
            },
            "Omar Reason Code Key": {
                "type": ["string","null"]
            },
            "Omar Tech ID": {
                "type": ["string","null"]
            },
            "Field Comments": {
                "type": ["string","null"]
            },
            "Number of Records": {
                "type": ["string","null"]
            }
        }
    }
}

My struggle has been trying to use the output of this file to iterate through its records and just create a new list item in an online SharePoint list.  I did an apply to each and a Create Item.  However, with mapping the fields in SharePoint to those item properties in the json parsed file is not even showing up as an option.  I even did a Compose right after the Parse Json activity and it is not working.

 

Thanks for any direction in this as I have been banging my head on a wall for the most of this day. 

1 ACCEPTED SOLUTION

Accepted Solutions
eric-cheng
Solution Sage
Solution Sage

Hi @guyinkalamazoo ,

 

You can use the Parse JSON action and paste your schema in.  You can then access the dynamic content in Create Items

 

Screenshot_20210925-120149_Chrome.jpg

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

View solution in original post

5 REPLIES 5
eric-cheng
Solution Sage
Solution Sage

Hi @guyinkalamazoo ,

 

You can use the Parse JSON action and paste your schema in.  You can then access the dynamic content in Create Items

 

Screenshot_20210925-120149_Chrome.jpg

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

Yes, I have already done that.  And Parsing JSON is delivering the proper file.  When I go into map the fields from the SharePoint list, nothing from the Parse JSON outputs are showing in the dynamic display.  Can these be manually entered?  And if so, what is the syntax?  Would it be something like outputs('json')?{items}[0]?

 

Thanks

kky1
Frequent Visitor

Dear guyinkalamazoo - I am experiencing exactly the same issue, having parsed the json and then Create Item in sharepoint using the Parse JSON dynamic content. The Flow said it ran successfully, but there was no data from the parsed JSON. Were you able to find a solution to this question?

I did, actually.  I dont know if it is the actual solution, but it works.  Where the JSON file says "type": ["string","null"], if I take out the "null" with the brackets so it reads "type": "string", it works and I can map the JSON elements to the columns in the SharePoint list.

 

kky1
Frequent Visitor

Thank you for the quick reply! In my case, I had the type as the same, but then removed "type": entirely after reading a post that said that could have been the issue. I was unable to remove the carriage return \r (I read and tried every post on that - got rid of \n but not \r. Anyway, I am beginning to suspect if that is my issue. Thank you again.

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,447)