Remove Duplicate entries pulling from the collection

 One of my project required to remove the duplicates while pulling the data from a collection. i got the collection but i need to remove the duplicate and add the value to the collection (value removed from collection).

I have used following code to achieve the functionality.

ForAll(colImportedData As Col,

   If(

      CountRows(

         Filter(

            colImportedData,

            ID= Col.ID

         )

      ) > 1,

      Collect(

          removedData,

          {

              Title: "Title",

              ID: ID              

          }

      )

   )

);


Here colImportedData is imported data and based on Id field we are removing the data from the collection.

Comments

Popular posts from this blog

Power Apps toPower Automate Error - The input body for trigger 'manual' of type 'Request' did not match its schema definition , the input String does not validate against the date

Power Apps - Restricting the Text Box only Whole Numbers

ETAG mismatch (Conflicts exist with changes on the server, please reload)