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 / 2 Collect Statements f...
Power Apps
Answered

2 Collect Statements for only 1 collection row

(0) ShareShare
ReportReport
Posted on by 82

Hello everybody,

I've been trying to store content from multiple Collect commands in the same row of a table for some time now. Unfortunately the entries are qritten in diffrent rows.

I used statements like:

Collect(
 Cache,
 {
 CustomerNo: input_custno.Text,
 CustomerName: input_custname.Text,
 ContactPerson: input_contact.Text,
 ProjectNo: input_prono.Text,
 OrderedBy: input_ordered.Text,
 CheckedBy: input_checked.Text,
 DateBegin: date_begin.SelectedDate,
 DateEnd: date_end.SelectedDate,
 FaultType: dropdown_faulttype.SelectedText,
 Priority: dropdown_prio.SelectedText
 }
)

I also tried Statements like 

ClearCollect

and stuff like that.

Collectionbad.PNG

[this is how it looks like]

 

Can anyone help me with that?

 

best regards Jonas

Collectionbad.PNG
Categories:
I have the same question (0)
  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @JonasH 

     

    Do you have separate expressions for adding these values? I mean first expression to add the values getting populated in first row and second expression with the values added in second row?
     
    Collect() create a new line in the collection and it won't merge the results until done with an expression.
     
    If you wish to edit the records in a existing row in the collection, then you might need to use the Patch() for the second expression instead of Collect() (This creates a new row). Here, you will need an identifier to recognize the specific row and update it.
     
    Second Expression: 
    Patch(Cache, LookUp(Cache, Name = "Value1"),{Col1:"Value2",Col2:"Value3"})
     
    If this differs, please share the set of expressions used by you, so that we might be able to help you better.
     
    Hope this helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • JonasH Profile Picture
    82 on at

    Thanks for your fast reply @yashag2255,

     

    I found out about 1. 5 hours ago that another solution was more suitable for my purposes.

    I've just tried to test your suggested solution so I can mark it as a solution, but I'd still have to create the columns for it. Currently I don't have time to understand how the AddColumn Expression works, so I assume that your solution works and mark it as a solution.

     

    Thank you so much for your help.

    Have a nice day ^-^ 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard