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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (18,517)