cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AnthonyPhan
Kudo Kingpin
Kudo Kingpin

Nested Concat

Hi All,

I am using the Concat function to generate a HTML table based on a collection. This is similar to what is being done here. For my application It would be very nice to have a concat funcation nested inside another Concat funcation (similar to having a for loop inside another for loop in C). However Im not sure how to reference the 'Result' of the child Concat.

 

For example:

if we have table a and b below:

Table A Table B
1 a
2 b
3 c



and I try to do this:
Concat( A, concat(B,  "A:" & Result & " B: " & Result & "<br /> ")

I hope to get something like:
A: 1 B:a
A: 1 B:b

A: 1 B:c
A: 2 B:a
A: 2 B:b
A: 2 B:c
A: 3 B:a
A :3 B:b
A :3 B:c


How can i distinguish A.Result from B.Result?? At the moment Result will always reference the result of the parent Concat.

1 ACCEPTED SOLUTION

Accepted Solutions
mr-dang
Community Champion
Community Champion

 

You can use RenameColumns() to rename the Result for either of them.

 

Assuming your formula is already working:

Concat(A, Concat(RenameColumns(B,"Result","Result_B"),  "A:" & Result & " B: " & Result_B & "<br /> ")

The renaming is not permanent and is only scoped to the formula.

 

Let me know if this works for you.

Microsoft Employee
@8bitclassroom

View solution in original post

2 REPLIES 2
mr-dang
Community Champion
Community Champion

 

You can use RenameColumns() to rename the Result for either of them.

 

Assuming your formula is already working:

Concat(A, Concat(RenameColumns(B,"Result","Result_B"),  "A:" & Result & " B: " & Result_B & "<br /> ")

The renaming is not permanent and is only scoped to the formula.

 

Let me know if this works for you.

Microsoft Employee
@8bitclassroom

View solution in original post

Cheers! this worked perfectly.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,492)