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
workflow | CheckNum | PaidDate |
SR-000298 | 654321 | 44475 |
SR-000297 | 954321 | 44475 |
SR-000297 | 754482 | 44475 |
SR-000297 | 145151 | 44475 |
SR-000296 | 145151 | 44475 |
SR-000296 | 145151 | 44475 |
CR-001266 | 200001 | 44475 |
CR-001266 | 200000 | 44475 |
result
workflow | Concat |
SR-000298 | 654321 44475 |
SR-000297 | 954321 44475, 754482 44475, 145151 44475 |
SR-000296 | 14,5151 44475, 14,5151 44475, |
CR-001266 | 200001 44475, 200001 44475 |
Solved! Go to Solution.
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.
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
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.
Hi anyone have solution ?
WarrenBelz
i want to do more , can i distinct concat record
run your code result
workflow | Concat |
SR-000298 | 654321 44475 |
SR-000297 | 954321 44475, 754482 44475, 145151 44475 |
SR-000296 | 14,5151 44475, 14,5151 44475, |
CR-001266 | 200001 44475, 200001 44475 |
can i distinct concat reord
workflow | Concat |
SR-000298 | 654321 44475 |
SR-000297 | 954321 44475, 754482 44475, 145151 44475 |
SR-000296 | 14,5151 44475, |
CR-001266 | 200001 44475, |
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
WarrenBelz
thx, it's work
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
199 | |
71 | |
50 | |
42 | |
30 |
User | Count |
---|---|
259 | |
124 | |
90 | |
88 | |
85 |