cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
shiroton
Regular Visitor

Workflow creates new list item instead of updating a list item

I created a workflow to update or create a list item in a secondary list when the primary list is updated. This works perfectly fine. My issue arises when I remove a character from a primary list item. Instead of updating the original secondary list item, it creates a copy with the updated information. If I add additional information, then the workflow works the way it was intended to. the only time this issue comes up is when I remove partial information from a list item.

Attached are pictures of the Workflow and the end result.

 

As you can See I made a change to the name on the primary list and the result was to create a new item as it was not on the secondary list. When I changed the name back to the original name, it did not update the original row on the list  but created a new item instead. how can I solve this issue?

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @shiroton ,

 

According to your description, let me explain why you encountered this problem.

When you change the name of the primary list back to the original name, Get Items action still does not find a record that meets the conditions.

Because Identifier is unique.

When you first create a record in a secondary list, the Identifier of this record is not equal to the Identifier in the primary list.

So every time you modify the name, it will create a new record .

It will only execute the condition to be true to create the record, and not execute the condition to be false to modify the records.

So, you could try to use other columns instead of Identifier.

You should use these columns to determine the relationship between the primary list and the secondary list.

In this way, when you modify a record in the primary list, you could find the corresponding record(records) in the secondary table.

 

When the record does not exist in the secondary list, create a new record.

Otherwise, it will modify the record instead of creating it.

Since this is a broad question, I gave a broad recommendation.

If you still have any question, please don't hesitate to let me know.

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

View solution in original post

1 REPLY 1
v-xiaochen-msft
Community Support
Community Support

Hi @shiroton ,

 

According to your description, let me explain why you encountered this problem.

When you change the name of the primary list back to the original name, Get Items action still does not find a record that meets the conditions.

Because Identifier is unique.

When you first create a record in a secondary list, the Identifier of this record is not equal to the Identifier in the primary list.

So every time you modify the name, it will create a new record .

It will only execute the condition to be true to create the record, and not execute the condition to be false to modify the records.

So, you could try to use other columns instead of Identifier.

You should use these columns to determine the relationship between the primary list and the secondary list.

In this way, when you modify a record in the primary list, you could find the corresponding record(records) in the secondary table.

 

When the record does not exist in the secondary list, create a new record.

Otherwise, it will modify the record instead of creating it.

Since this is a broad question, I gave a broad recommendation.

If you still have any question, please don't hesitate to let me know.

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (1,939)