I've Collection as attached below.
In that Collection i'm having two values i.e SharePoint;Nintex and Nintex;Sharepoint. so i have to merge both of the values into single value as SharePoint;Nintex and i've to remove the duplicated value i.e Nintex;Sharepoint in the final collection
Solved! Go to Solution.
Hi @Krishna98 :
Your needs can be solved using the matching function.I've made a test for your reference:
1\My data source-YourCollection
ClearCollect(YourCollection,["SharePoint;Nintex","Nintex;SharePoint","SharePoint;Power Platform"])
2\Add a button and set it's OnSelect property to:
ClearCollect(
YourCollection,
RenameColumns(
Distinct(
AddColumns(
YourCollection,
"NewColumn",
Concat(
Sort(
Split(
Value,
";"
),
Result
),
Result,
";"
)
),
NewColumn
),
"Result",
"Value"
)
)
Best Regards,
Bof
Hi @Krishna98 :
Your needs can be solved using the matching function.I've made a test for your reference:
1\My data source-YourCollection
ClearCollect(YourCollection,["SharePoint;Nintex","Nintex;SharePoint","SharePoint;Power Platform"])
2\Add a button and set it's OnSelect property to:
ClearCollect(
YourCollection,
RenameColumns(
Distinct(
AddColumns(
YourCollection,
"NewColumn",
Concat(
Sort(
Split(
Value,
";"
),
Result
),
Result,
";"
)
),
NewColumn
),
"Result",
"Value"
)
)
Best Regards,
Bof
It Worked Excellent. Thnks so much.
can u explain the formula that what u have done here @v-bofeng-msft
Hi @Krishna98 :
Let me explain this code:
ClearCollect(
YourCollection, /*Step5:Overwrite the original data in YourCollection with new data*/
RenameColumns( /*Step4:Rename the column name of the table after deduplication (because the column name of the return value is "Result")*/
Distinct( /*Step3:De-duplication according to the value in NewColumn (because the string has been rearranged in order, duplicate values with different orders can be deleted)*/
AddColumns(
YourCollection,
"NewColumn", /*Step2:Add a new column"NewColumn", fill it with the value obtained in Step1*/
Concat( /*Step1:Split the character string in value according to ";", arrange it in order and re-integrate it into a new uniform string in a certain order*/
Sort(
Split(
Value,
";"
),
Result
),
Result,
";"
)
),
NewColumn
),
"Result",
"Value"
)
)
Best Regards,
Bof
Tq So Much 🙂
User | Count |
---|---|
262 | |
110 | |
98 | |
54 | |
40 |