web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Add multiple items to ...
Power Apps
Answered

Add multiple items to collection (same row)

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi

I am using the new AI Builder with PowerApps. In my model, I have a table field that contains "QTY" and "NET PRICE". So on the AI Builder element within the PowerApps editor, I add these to a collection called "TableCollection":

 

Collect(TableCollection;FormProcessor1.FormContent.Tables.table_0.QTY;FormProcessor1.FormContent.Tables.table_0.'NET PRICE')


I have then added a simple datatable, to show these values:

Items: TableCollection


However this add each table.item to their own row as below. I would like these to be on the same row:

table.PNG

Categories:
I have the same question (0)
  • SimonPiquer Profile Picture
    255 on at

    Hi,

     

    I am not able to try this using the AI builder currently, but here are my thoughts:

     

    When you deliminate in the Collect function you create a new Item.


    Instead try the following: 

    Collect(TableCollection;{QTY: FormProcessor1.FormContent.Tables.table_0;'NET PRICE':FormProcessor1.FormContent.Tables.table_0)

     
    Would that work?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Got a bit closer to a solution I believe. Now the content is on the same row, but it prints [object Object]:

     

    table.PNG

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Do you want to add the QTY field value and "NET PRICE" field value into a same row of a Collection?

     

    Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:

    Set the OnSelect property of the " Button" control to following:

     

    Collect(
    TableCollection;
    {
    QTY: FormProcessor1.FormContent.Tables.table_0.QTY ;
    'NET PRICE': FormProcessor1.FormContent.Tables.table_0.'NET PRICE'
    }
    )

    Or

    ClearCollect(
      TableCollection;
     {
     QTY: FormProcessor1.FormContent.Tables.table_0.QTY ; 
     'NET PRICE': FormProcessor1.FormContent.Tables.table_0.'NET PRICE'
     }
    )

     

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi


    Thanks for taking your time to reply. However, it still does not work - still showign [object Object].

     

    Capture.PNG

    For my DataTable.Items: TableCollection

     

     

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Could you please share a bit more about the data structure of your table_0? Are there many records within it?

     

    Please consider modify your formula as below:

    Collect(
    TableCollection;
    {
    QTY: First(FormProcessor1.FormContent.Tables.table_0).QTY ;
    'NET PRICE': First(FormProcessor1.FormContent.Tables.table_0).'NET PRICE'
    }
    )

    Or

    ClearCollect(
      TableCollection;
     {
     QTY: First(FormProcessor1.FormContent.Tables.table_0).QTY ; 
     'NET PRICE': First(FormProcessor1.FormContent.Tables.table_0).'NET PRICE'
     }
    )

     

    Please take a try with above solution, then check if the issue is solved.

     

    Best regards,

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    OK I found a solution. It seeems, that instead of adding the table items from the AI Form Processor to a collection, I can simply add them directly to a table.

    So for my table object, I add this to the "Items" field:

     

    FormProcessor1.FormContent.Tables.table_0
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    HI @Anonymous ,

    Yeah, you are right.

     

    If the result the FormProcessor1.FormContent.Tables.table_0 formula returned is a Table value, you could directly type it within the Items property of that control (e.g. Data Table control).

     

    If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

     

    Best regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 493 Most Valuable Professional

#2
11manish Profile Picture

11manish 479

#3
Haque Profile Picture

Haque 328

Last 30 days Overall leaderboard