web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to group by and Co...
Power Apps
Unanswered

How to group by and Concatenate from the first sharepoint list and then patch to second sharepoint list

(0) ShareShare
ReportReport
Posted on by 100

i have sharepoint list (below), How to group by and Concatenate from the first sharepoint list and then patch to second sharepoint list

 

sharepoint list

workflowCheckNumPaidDate
SR-00029865432144475
SR-00029795432144475
SR-00029775448244475
SR-00029714515144475
SR-00029614515144475
SR-00029614515144475
CR-00126620000144475
CR-00126620000044475

 

 

 

result

workflowConcat
SR-000298654321 44475
SR-000297954321 44475, 754482 44475, 145151 44475
SR-00029614,5151 44475,  14,5151 44475,
CR-001266200001 44475, 200001 44475
Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @hong_yip ,

    The structure should be something like this

    With(
     {
     wPatch:
     AddColumns(
     GroupBy(
     SPList,
     "workflow",
     "Data"
     ),
     "CheckNums"
     Concat(
     Data,
     CheckNum & " "
     ),
     "PaidDates"
     Concat(
     Data,
     PaidDate & " "
     )
     )
     },
     ForAll(
     wPatch As aPatch,
     Patch(
     SPList2,
     Defaults(SPList2),
     {
     workflow:aPatch.workflow,
     ConcatField:
     aPatch.CheckNums & ", " & aPatch.PaidDates
     }
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • hong_yip Profile Picture
    100 on at

    Hi anyone have solution ?

     

     

    WarrenBelz

     

    i want to do more , can i distinct concat record

     

    run your code result

    workflowConcat
    SR-000298654321 44475
    SR-000297954321 44475, 754482 44475, 145151 44475
    SR-00029614,5151 44475,  14,5151 44475,
    CR-001266200001 44475, 200001 44475

     

    can i distinct concat reord

    workflowConcat
    SR-000298654321 44475
    SR-000297954321 44475, 754482 44475, 145151 44475
    SR-00029614,5151 44475,  14,5151 44475,
    CR-001266200001 44475, 200001 44475
  • Verified answer
    WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    @hong_yip ,

    I cannot test this but the below should work

    With(
     {
     wPatch:
     AddColumns(
     GroupBy(
     SPList,
     "workflow",
     "Data"
     ),
     "CheckNums"
     Concat(
     Distinct(
     Data,
     CheckNum
     ),
     Result & " "
     ),
     "PaidDates"
     Concat(
     Distinct(
     Data,
     PaidDate,
     ),
     Result & " "
     )
     )
     },
     ForAll(
     wPatch As aPatch,
     Patch(
     SPList2,
     Defaults(SPList2),
     {
     workflow:aPatch.workflow,
     ConcatField:
     aPatch.CheckNums & ", " & aPatch.PaidDates
     }
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • hong_yip Profile Picture
    100 on at

     

     

    thx, it's  work 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard