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 / Saving updated gallery...
Power Apps
Answered

Saving updated gallery (collections) / Auto-refresh update collections

(0) ShareShare
ReportReport
Posted on by 235

Hi everyone, I am new to using powerapps. I have created this save button which basically saves the collection onto my SP lists. I also have a button that adds a new row to my gallery. This new row button will only be saved on the collections once clicked. Question is, how can I have an auto-refresh update onto my collections? As you can see, the top row will only be saved on to my collection once I hit the save button not the bottom row since the logic is that the collections will create once I hit the new row button. Thanks very much!

rbalza_0-1630893594517.png

 

Categories:
  • nish5562 Profile Picture
    23 on at

    Hi,

    Please make use of Refresh(collection name) in the Timer function.

  • rbalza Profile Picture
    235 on at

    Hi nish5562, thanks for taking the time on this. Would you be so kind to tell me how can I achieve it? Thanks!

  • Ram Prakash Duraisamy Profile Picture
    5,891 Super User 2026 Season 1 on at
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @rbalza :

    Could you please tell me:

    1\What is the gallery's items property?

    2\How do you add a new row to your gallery?

    3\How do you update the collection now?What the formula is?

    4\How is the auto refresh you need triggered?

    • When all new lines in the Gallery are filled in, they are automatically saved.
    • Each time period is automatically saved once.
    • ……

    Best Regards,
    Bof

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

    Hi @rbalza :

    Has this problem been solved?Do you need any help now?

    Best Regards,

    Bof

  • rbalza Profile Picture
    235 on at

    Hi Bof, thanks for taking the time on this. Please find below answers on your questions. Hope it helps.

    1\What is the gallery's items property? - Collections with the name of GalleryPricingData

    rbalza_0-1631078261866.png

     

    2\How do you add a new row to your gallery? - I add a new row to the gallery once the button is clicked. This is somewhat the problem is, since the collections will be "collect" when the button is clicked. By default, there's no table that is showing. Meaning when I clicked the button, there will be an empty collection on the first row.
    Gallery

    rbalza_1-1631078325747.png

    Collections

    rbalza_2-1631078363126.png

     

     

     

    3\How do you update the collection now?What the formula is?

     

    Collect(
     GalleryPricingData,
     {
     Job_x0020_Category: JobCategory.Selected.Result,
     Entity_x0020_Type: EntityType.Selected.Result,
     Job_x0020_Type: JobType.Selected.Result,
     Invoice_x0020_Description: InvoiceDescription.Value,
     Min_x0020_Fee: MinFee.Value,
     Qty: Quantity.Value,
     Nominal_x0020_Value: NominalValue.Value,
     Complexity_x0020_Value: ComplexityValue.Value,
     Total: Total.Value,
     Client_x0020_Name: ClientName.Selected.Result,
     ClientGroup: ClientGroup.Value,
     ClientCode: ClientCode.Value
     }
    )

     

    4\How is the auto refresh you need triggered? - 

    • When all new lines in the Gallery are filled in, they are automatically saved.



     

  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    Hi @rbalza 

     

    Have you tried 

    ClearCollect(GalleryPricingData)

     

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

    Hi @rbalza :

    Thanks for your feedback.If there is anything wrong with my understanding please tell me:

    1\There is a Gallery and it's items is a collection named GalleryPricingData

    2\You use a button to add a new record into "GalleryPricingData" to add a new row into the Gallery.The code in the 'add a new row button' is:

     

    Collect(
     GalleryPricingData,
     {
     Job_x0020_Category: JobCategory.Selected.Result,
     Entity_x0020_Type: EntityType.Selected.Result,
     Job_x0020_Type: JobType.Selected.Result,
     Invoice_x0020_Description: InvoiceDescription.Value,
     Min_x0020_Fee: MinFee.Value,
     Qty: Quantity.Value,
     Nominal_x0020_Value: NominalValue.Value,
     Complexity_x0020_Value: ComplexityValue.Value,
     Total: Total.Value,
     Client_x0020_Name: ClientName.Selected.Result,
     ClientGroup: ClientGroup.Value,
     ClientCode: ClientCode.Value
     }
    )

     

     3\You want to automatically synchronize all the modifications you make in the gallery to the collection GalleryPricingData.

    If my guess is correct, then this requirement is very easy to achieve——

    There are many controls for input in your gallery, you can achieve your needs by setting their OnChange property:

    For example:

    I assume there is a textinput control(TextinputValue) to Update the Value field of the current record in GalleryPricingData,then you could set the TextinputValue's OnChange property to:

     

    Patch(GalleryPricingData,ThisItem,{Value:Self.Text})

     

    if Value is a number column it should be 

     

    Patch(GalleryPricingData,ThisItem,{Value:Value(Self.Text)})

     

     By analogy, you only need to set the OnChange familiarity of all the controls in the Gallery, and any changes you make in the Gallery can be synchronized to the collection GalleryPricingData in real time.

    Best Regards,

    Bof

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

    Hi @rbalza :

    Hope this link helps:

    Editable Tables 

    Best Regards,

    Bof

  • rbalza Profile Picture
    235 on at

    Hi @v-bofeng-msft. Thanks for taking the time on this. You've got all the points correct. However, on the 2\How do you add a new row to your gallery? - How can I have a default rows on the gallery that is showing? As mentioned, by default there are now rows that are showing and when I hit the new row button, it saves the empty rows as you can see on the snapshot. Appreciated your time on this and will absolutely do your solution.

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
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard