Hello!
I'm having a bit of an issue comparing what I believe to be 2 different arrays. I'm pulling from a SQL Database 5-10 rows and comparing one columns values to the list of items already in a SPO list. If that column isn't found in the SPO list, then I need to write that SQL Rows data to the SPO list. The item I am comparing (KeyID) is unique and not duplicated anywhere. A couple of questions about this:
1. After a lot of trial and error and looking through tons of posts, I think I've found out I need to pass the KeyID column of SQL and SPO into their own array variables then compare them. Is that the best way?
2. If it is, I've successfully passed the KeyID Column from SQL to a variable and into Sharepoint. I've had the damnedest time making an IF statement to determine if the KeyID pulled from SQL is already in SPO. My logic is below. I feel like contain is the wrong comparison to use and that I may not be comparing individual elements in the Array Variable to the individual elements in the other Array. Any help is welcome!
Solved! Go to Solution.
Hi @Dave5 ,
It seems you want to check whether the KeyID Column value from SQL in the SharePoint list.
If no, insert the row into the list.
I have made a flow for your scenario, please check it for a reference.
In my flow, I check if the ID value from SQL in the list 'ID' column.
Here I set an array variable to append all the value from the list 'ID' column.
Then use the contains function to check the each item from SQL.
Best Regards,
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Dave5 ,
It seems you want to check whether the KeyID Column value from SQL in the SharePoint list.
If no, insert the row into the list.
I have made a flow for your scenario, please check it for a reference.
In my flow, I check if the ID value from SQL in the list 'ID' column.
Here I set an array variable to append all the value from the list 'ID' column.
Then use the contains function to check the each item from SQL.
Best Regards,
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You're amazing! Thank you. I couldn't wrap my head around this. It works like a charm.
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
User | Count |
---|---|
86 | |
60 | |
51 | |
44 | |
39 |
User | Count |
---|---|
89 | |
81 | |
74 | |
62 | |
44 |