I'm hoping to get some guidance. I found this Flow Blog and it worked exactly as intended: Copying Using Filtering However, I need what is discussed toward the bottom around using unique ID's to prevent new items always being created. Here's the verbiage:
Another limitation is if the field that you are using to keep items in sync between the two lists changes, a new item will be created in the destination list. For example, if you are using a person's Name to copy between the two lists, and their Name changes, the flow will think that it is a new item, not an update to an existing item. If you can guarantee that the Name will never change then you won't be impacted by this. However, if Name is a field that can change, you will need to add a new column to the destination list that stores the ID of the item in the first list. In this case, rather than using Name to find items, you can use ID instead (and the ID is guaranteed to always be unique).
I'm struggling to figure out how to make this work correctly and don't know enough about creating filter queries and condition syntax to resolve it on my own. Any help would be appreicated.
Solved! Go to Solution.
First off, I really appreciate all of your help. The solution you posted didn't work 100%. It did start spitting out values and I made some changes to the YES/NO paths. For whatever reason in both update item and create item, it wanted the dynamic content from the source (SMART Space) list. By selecting those and using the field from "When an item is created or modified" and NOT "Get Item" it worked. See below:
Without your help I wouldn't have gotten this figured out. It works swimmingly and whenever an item is created or updated in the source list, it "flows" to the destination (Staging) list... for now. *crosses fingers*
Something similar to this came up in a recent post here in the forum. The idea is that one list (Daily List) has items created automatically on a daily basis by a specific flow, and several other lists (Custom Task Lists) will have a daily item created by a given user. Then the item from the Custom Task Lists will have a unique ID that will be used to compare the pertaining item in the Daily List and then update its status. Check out the link and let me know if this is something you would like to achieve.
Fausto Capellan, Jr
Here's a kicker for you. I followed those instructions to a "T" in that article, and now, for whatever reason it wants to make an array under the "yes" condition. So, right now I have a half-assed flow working.
And the copy.. forces creation of an array that returns zero results.
Can you please post your lists structure and screenshots of your flow steps so I can try to replicate on my end?
Fausto Capellan, Jr
Sorry about that.
here are the photos that i intended to show in my prior post
The first one works, the second does not. the only other difference i see is the time to process
I need to see the steps from when you edit the flow, not when the flow runs. This is so I can see how your flow steps are configured and I can easily replicate on my end. I should have been more specific on my previous post. My apologies.
Absolutely. I'll make two posts. The first one being the "broken" flow, and the second being the one that works.
For reference, in list 1 (SMART), I have five columns to pull. List two is "Staging" and field names are the same five columns.
Here's the functional one.
I also thought this might be interesting as populated from the dynamic content menu.. it's slightly different than it was
Is the value of the Title column uniqute to each item or is it used over in other items? I'm just trying to picture if the Title column can be used as unique ID when flow copies data between the lists. Another question: is the data copy a one-way process?
Yes, each item is unique. I'm using the "What" column as the title (by rename). In this case, I would not have multiple of the same "What" values. Each "What" entered is unique.
Yes, the data copy is one way to prevent endless loops.
Looking at your flow steps, shouldn't you be queryin the Staging list to make sure the item you are creating in the SmartSpace list doesn't exist there? I see you are querying the SmartSpace list instead.
Thanks for your continued help. Maybe I have something backwards. The intention is that Smart Space is the origin so the flow should go from Smart Space into the Staging list.
What I want is that when a new item is added to Smart Space it gets pushed to Staging and if an item is updated in Smart Space it updates in Staging. I'd be happy to get newly created items only. Updates are like extra credit.
Change the Get items to the Staging list and not the SmartSpace one. Then the condition will return false if the newly created item in SmartSpace does not exist in the Staging list. From there, create the item in the Staging list under the Yes condition.
Please try it and let me know.
no such luck. when the flow runs and returns either a true or false condition, the yes/no branch displays "the array input was empty". (i tested both ways to validate)
@faustocapellanj, it also may be worth noting the expression returns value as true for both 0 and 1 values so perhaps the condition is written incorrectly? i think i see where you're trying to go..
The expression in the condition is fine. What do you get in the Get items step after the flow runs? I just ask because for the array to be empty, it means you're not getting anything in the Get items step.
This might be a long post so I will split it in 3 posts:
Item Created Steps:
Part 2 coming up in a few minutes.
Part 2. This includes all the output after a new item is created in the SmartSpace list, which then creates the pertaining new item in the Staging list.
Part 3 will be up in a few minutes.
Part 3. This includes all the output after an existing item is modified in the SmartSpace list, which then updates the pertaining item in the Staging list.
Please check out all 3 posts and let me know the outcome after you test it.
Fausto Capellan, Jr
Check out the News & Announcements to learn more.
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
Check out our new Discover Your Career Path blog post series and get all the details.