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 / Make a collection with...
Power Apps
Answered

Make a collection with 1 or multiple records then add that collection to a table

(0) ShareShare
ReportReport
Posted on by 3

I am trying to 1. make a collection and 2. patch that collection to a table

I will illustrate both to make sure others who have similar issues can use my case to help themselves. Assuming someone helps me. 

 

1. Make a collection (no issues with this collection written below)

Why: to store information when the internet is not available on a device to be submitted to a table once the internet is available.

 

Collect(storedtickets, {'Item Column':'Item Drop down'.Selected.Value,'Start Time Collumn':'Start Drop down'.Selected.Value, 'End date column':'End Drop Drop Down'.Selected.Value});
SaveData(storedtickets,"LocalSavedtickets")

 

The two photos below demonstrate the collection written in blue working:

 

andrewkennedy_2-1676411717201.pngandrewkennedy_3-1676411730933.png

 

2. Patch that collection to a table using a button

Table= (Mytabl99) where collection= (storedtickets) needs to be added:

The table is in excel under one drive:

 

andrewkennedy_0-1676410965725.png

 

I tried:

on select= Patch(Mytabl99,stored tickets)                            <<<gets the below error

andrewkennedy_5-1676412293659.png

So then tried:

on select= Patch(Mytabl99,First(storedtickets)  <<< using (First) command to try and make it only one record instead of a table

 

andrewkennedy_6-1676412348160.png

 

I can't figure out why it says the above column 'End date Column' does not exist when as shown above it clearly does.

If anyone can assist or propose an alternative solution I would be very grateful thank you for taking the time to read.

 

Categories:
  • Verified answer
    EddieE Profile Picture
    4,650 Moderator on at

    @andrewkennedy 

    Sometimes, PowerApps does weird things with schemas. The way I've dealt with similar issues is to create the schema you need from the base table first, then Collect into that table/schema. I do this using the following

     

    // App OnStart
    // create schema
    ClearCollect( storedtickets, First(Mytabl99));
    
    // clear collection
    Clear(storedtickets)
    
    // use your collect functions as per your current code

     

    See if this fixes it? You may need to re-write your Collect() function and picking column names from the Intellisense options but this should work.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard