cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dos757
Resolver I
Resolver I

PowerApps create collection with 2 columns

Hi, 

 

i have a forAll that loop on the invoiceLineQuotes of the Business Central Application to get the ItemId and the ItemPicture. 

 

 

 

ForAll(
    LignesProduit;
    Collect(
        ItemPic;
        ThisRecord.itemId&";"&'[BC-CRM]-Récupérerl''imageduproduit'.Run(
            GUID(ThisRecord.itemId);
            ""
        ).imgcontent
    )
)

 

 

 

This code give me the result i want but in a simple column named result. 

 

Result 

WXUI-5439.........;PictureContentOfThisID.....

HTRF-8954..........;PictureContentOfThisID.....

 

What i need is a collection like that 

ID                        |      Picture

WXUI-5439........    PictureContentOfThisID

HTRF-8954.........    PictureContentOfThisID

 

How can i do that ?

 

Many thanks for your help

1 ACCEPTED SOLUTION

Accepted Solutions
v-albai-msft
Community Support
Community Support

Hi @dos757 ,

You can use this formula to create a Table collection:

ForAll(
    LignesProduit;
    Collect(
        ItemPic;
       {
	ID: ThisRecord.itemId;
	Picture:'[BC-CRM]-Récupérerl''imageduproduit'.Run(GUID(ThisRecord.itemId);"").imgcontent
	}
    )
)

valbaimsft_0-1627526087694.png

valbaimsft_1-1627526102044.png

Best regards,

Allen

 

View solution in original post

2 REPLIES 2
BCLS776
Super User
Super User

Try this code instead:

ForAll(
    LignesProduit;
    Collect(
        Picture: ItemPic;
        ID: ThisRecord.itemId&";"&'[BC-CRM]-Récupérerl''imageduproduit'.Run(
            GUID(ThisRecord.itemId);
            ""
        ).imgcontent
    )
)
_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
v-albai-msft
Community Support
Community Support

Hi @dos757 ,

You can use this formula to create a Table collection:

ForAll(
    LignesProduit;
    Collect(
        ItemPic;
       {
	ID: ThisRecord.itemId;
	Picture:'[BC-CRM]-Récupérerl''imageduproduit'.Run(GUID(ThisRecord.itemId);"").imgcontent
	}
    )
)

valbaimsft_0-1627526087694.png

valbaimsft_1-1627526102044.png

Best regards,

Allen

 

View solution in original post

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!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,367)