Hi,
I have created a flow that is getting data from MessageCenter and puts the data in a SharePoint list called MessageCenterData.
What I am trying to do is each time the flow is running, it will check if there is a new message, or if an old message is updated and then update the data or create new data in SharePoint list.
I am trying to create a condition, but I am out of ideas.
Here is the flow
Can someone please help me ?
Solved! Go to Solution.
Thank you for your help
I was collecting my data from ms graph as a json input. Some of the data has several input on the same string. To collect all the data as an array , I created a join in the Output and put it in a SharePoint list. I then created a new SharePointlist with the same data, used Get Items, used Id as a uniqe Identificator and the condition
Can you please check my blog article on how exactly to check if there is an existing item already on sharepoint , so either create if does not exist or Update if it exists.
Let me know if you need more help on this!
Hi @vidarv
To decide the record is exists or not in SharePoint you need to use the Filter Query of Get Items. Have you got any unique value for each record. Using this you could filter the record.
Please see below
Above I am checking the record count for the relevant record exists or not.
The expression is as follows:
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogThank you for your answers @abm @Mira_Ghaly
I can’t get your tips to work.
The data is collected from ms graph send to parse json and thereafter to select. After data is collected to SharePoint list the first time and the flows run each day it will discover new items, som items has changed dates another items has changed the title but Id is unique. If Id is unique but lastupdated date has changed all the fields has to changed to the new fields from select output. There can be new Id and fields that has changed values.
Hope this make it more clear.
Hi @vidarv
Check the schema generated is correct. When you generate the schema it may fail with string/null error. So update the schema with ["string", "null"] under the parse JSON step. Add the Get Items to filter the query. Check the condition for record exists or not. Then add Create or Update item.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogThank you for your help
I was collecting my data from ms graph as a json input. Some of the data has several input on the same string. To collect all the data as an array , I created a join in the Output and put it in a SharePoint list. I then created a new SharePointlist with the same data, used Get Items, used Id as a uniqe Identificator and the condition
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
32 | |
32 | |
24 | |
24 | |
20 |
User | Count |
---|---|
60 | |
57 | |
43 | |
37 | |
28 |