cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
asif082
Helper I
Helper I

Split multiple column into multiple rows in Canvas app

Hello Everyone,

 

I have been trying to split multiple sql columns into multiple rows in a collection. Below is the screen shot

 

Current SQL Table 

asif082_0-1630919742725.png

For above table I have used gallery to populate the data

 

So, when user click edit on selected gallery item, it create a collection by splitting each user_name and User_Email into rows 

asif082_1-1630919788694.png

 

 

So far this is what I have done by searching online.

asif082_2-1630920075644.png

 

What I can't figure out is how to add User_Email into AddAccess collection.

 

If someone can help me with above that would be great.

 

Thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@asif082 ,

 

With(
     {
      Names:Split(galAddAccess.Selected.Access_Name,","),
      Emails: Split(galAddAccess.Selected.Access_Email,",")
     },
     ForAll(
         Sequence(CountRows(Names)),
         Collect(Collection,{
                             Name:Last(FirstN(Name,Value)).Result, 
                             Email:Last(FirstN(Emails,Value)).Result
                            }
         )
     )
)

 

 

View solution in original post

7 REPLIES 7
Nogueira1306
Community Champion
Community Champion

Why dont you use an "&&" ??

 

Split(UserName,", ") && Split(UserEmail,", "), Collect(AddAccess,{FullName: Result, Email: Result})

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Thanks @Nogueira1306 I did that but it is giving error.

 

asif082_0-1630925436104.png

 

asif082
Helper I
Helper I

Hi Guys,

If anyone can help me with above that would be great. 

 

Thanks.

Split(UserName,", "),Split(UserEmail,", "), Collect(AddAccess,{FullName: Result, Email: Result})

 

But I think that will not work...

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Yes you are right above is not working. 

@asif082 ,

 

With(
     {
      Names:Split(galAddAccess.Selected.Access_Name,","),
      Emails: Split(galAddAccess.Selected.Access_Email,",")
     },
     ForAll(
         Sequence(CountRows(Names)),
         Collect(Collection,{
                             Name:Last(FirstN(Name,Value)).Result, 
                             Email:Last(FirstN(Emails,Value)).Result
                            }
         )
     )
)

 

 

View solution in original post

Thank you so much @gabibalaban

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,795)