cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Every possible combination of two collections

I thought this would be simple but I'm Stumped.

I have 2 collections that is a list of text codes.

Ex:

Collection1       Collection2

101                     201

102                     202

103                     203

 

I would like to create a third collection of every possible combination of Collection1 / Collection 2.  I will concatenate them with a "/" between them. With results like:

 

CombinationCollection

101/201

101/202

101/203

102/201

102/202

102/203

103/201

103/202

103/203

 

Any help would be appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

@murv500 

If you're trying to build another collection from them, then one option you can use is the following formula:

 

ForAll(Collection1, 
     ForAll(Collection2, 
         Collect(newCollection, 
                     Text(Collection1[@Value]) & "/" & Text(Collection2[@Value])
                     )
               )
        )

I hope that is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

@murv500 

If you're trying to build another collection from them, then one option you can use is the following formula:

 

ForAll(Collection1, 
     ForAll(Collection2, 
         Collect(newCollection, 
                     Text(Collection1[@Value]) & "/" & Text(Collection2[@Value])
                     )
               )
        )

I hope that is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Highlighted

Beautiful!  Thank you!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (13,564)