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:
Solved! Go to Solution.
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
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?
Got a bit closer to a solution I believe. Now the content is on the same row, but it prints [object Object]:
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,
Hi
Thanks for taking your time to reply. However, it still does not work - still showign [object Object].
For my DataTable.Items: TableCollection
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,
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
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,
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
203 | |
183 | |
76 | |
46 | |
37 |
User | Count |
---|---|
328 | |
260 | |
123 | |
72 | |
58 |