I have done this before and it has work, but with this new work flow I do not know why. I have the following section from the automate job
The CSV is demographic information (I cannot post a sample due to PHI data) with first name, last name, address, etc etc etc, nothing out of the ordinary. It is generated from a SQL server procedure and is delivered to a share every morning. And the file share it is saved to is the trigger for this flow. All I need to do is parse this csv and create new SharePoint list items.
The newLine is a regular CRLF. splitByLines is split(body('Get_file_content'),outputs('newLine')). fieldNames is split(first(outputs('splitByLines')),','). Select is skip(outputs('splitByLines'),1) and lists all the 17 fields except for the last one and then the Select Item is split(item(),',')?[0] <-- or whatever index it happens to be. SampleData was used to get the JSON structure.
This is the JSON schema. When I add the action to create an item to SharePoint, the ONLY things that are listed for the options for the fields in the list (from JSON) are: item, body, and the one field that is the key, "clientid"...no other fields can be mapped.
I appreciate any help. I am hoping it is something simple.
{
"type": "array",
"items": {
"type": "object",
"properties": {
"clientid": {
"type": "string"
},
"firstname": {
"type": [
"string",
"null"
]
},
"lastname": {
"type": [
"string",
"null"
]
},
"middlename": {
"type": [
"string",
"null"
]
},
"dob": {
"type": [
"string",
"null"
]
},
"city": {
"type": [
"string",
"null"
]
},
"state": {
"type": [
"string",
"null"
]
},
"zip": {
"type": [
"string",
"null"
]
},
"sex": {
"type": [
"string",
"null"
]
},
"ssn": {
"type": [
"string",
"null"
]
},
"RaceName1": {
"type": [
"string",
"null"
]
},
"RaceCode1": {
"type": [
"string",
"null"
]
},
"RaceName2": {
"type": [
"string",
"null"
]
},
"RaceCode2": {
"type": [
"string",
"null"
]
},
"RaceName3": {
"type": [
"string",
"null"
]
},
"RaceCode3": {
"type": [
"string",
"null"
]
},
"HispanicOriginCode": {
"type": [
"string",
"null"
]
}
},
"required": [
"clientid",
"firstname",
"lastname",
"middlename",
"dob",
"city",
"state",
"zip",
"sex",
"ssn",
"RaceName1",
"RaceCode1",
"RaceName2",
"RaceCode2",
"RaceName3",
"RaceCode3",
"HispanicOriginCode"
]
}
}
Solved! Go to Solution.
@iskguy this is how you can get everything inside properties, the below example shows how to get value from lastname, I pasted your JSON in a compose, hence I used compose_2 in below expression but you need to use output which gives you JSON
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
@iskguy this is how you can get everything inside properties, the below example shows how to get value from lastname, I pasted your JSON in a compose, hence I used compose_2 in below expression but you need to use output which gives you JSON
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Thanks! I will try this out.
Sadly I just ran it and as it did run for nearly an hour, I was thinking it would work, but all data was blank. So I am still not sure what is going on
@iskguy create a new test flow, trigger manual, compose action then paste your JSON in compose, take another action and paste the expression given above, if it works in test flow, it has to work in your flow also
Try this out
Thank you again. I did try something as I noticed that the customerid value was the only field that could be mapped. I removed the "null" from the types and they did appear so I could map them to the same fields in the SharePoint list. After, I re-added the "null" and it is working
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
42 | |
17 | |
15 | |
15 | |
13 |
User | Count |
---|---|
68 | |
37 | |
27 | |
20 | |
18 |