adc
adc

Reputation: 1

How to find a duplicate value from a one column in SharePoint and update the latest duplicate column to new value using power automate

I have a SharePoint list were one column has duplicate values with same numbers .I need to query all the duplicate values from the SharePoint list for one column and update the item values which is duplicate and recently created .This i want to achieve using power automate.

enter image description here First column has duplicate values which are created at same time .I need to get the latest duplicate value id and change the value

  1. Get items

  2. Select

sort(body('Select'),'sortby'))
  1. Compose
range(0,length(outputs('Compose_2')))
  1. Select 2
addProperty(
  outputs('Compose_2')?[item()],
  'IsDuplicate',
  if(
    equals(
    outputs('Compose_2')?[item()]?['concat'],
    outputs('Compose_2')?[sub(item(),1)]?['concat']),
    'T','F'
  )
)

this above action is returning result as T ,even for non duplicate items

Upvotes: 0

Views: 83

Answers (1)

Sam Nseir
Sam Nseir

Reputation: 12111

If null = null then T.

You've used Concat in your Select, but then you used concat in your if. It's case-sensitive.

Either change this to lower case "concat": enter image description here

Or update this to Upper case:

addProperty(
  outputs('Compose_2')?[item()],
  'IsDuplicate',
  if(
    equals(
    outputs('Compose_2')?[item()]?['Concat'],
    outputs('Compose_2')?[sub(item(),1)]?['Concat']),
    'T','F'
  )
)

Upvotes: 0

Related Questions