cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rbalza
Helper IV
Helper IV

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

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

 

27 REPLIES 27

@v-bofeng-msft it does save in the collection in a weird thing and it doesn't show up a new row. Should I close this thread and make a new question again since this it takes a long now 🙂

rbalza_0-1631152253519.png

 

Hi @rbalza :

Which fields of the new row you create need to have values, and which fields need to be empty?

I can make a simple Demo for you:

Could you provide me with the requirements and domo data for testing?

Could you tell me what these controls are? Are they in the Gallery.

vbofengmsft_0-1631152544140.png

Best Regards,

Bof

 

@v-bofeng-msft sure, really appreciated your help on this one. Here's the sample data. https://www.dropbox.com/scl/fi/27xa6m5ntz7krbio0n43b/SampleDataMSPowerApps.xlsx?dl=0&rlkey=87cubuj8t... 
This sample snapshot of what I am doing, all the data on the gallery were fetch from the sample data provided. Except for columns Qty and Complexity value which will be filled by the user (empty by default). These will calculate the nominal value and total columns respectively. There were two text field at the lower right bottom of the page  which will calculate the total columns of the gallery and the other text field will divide the total into 12. Two buttons were there (new row button which can add a new row and save the collections in the gallery, save button which the collections will be save on another SP list). Thanks again!

rbalza_0-1631153774630.png

 




Hi @rbalza :

Do you encounter a situation where multiple rows are added at a time or changes made to one row take effect in other rows?

If so,I've encountered the same problem.The point is that you need add a primary key like ID into the collection.

1\Set this code into the App's OnStart proeprty(ID is a new field I added, others can be set in your original way)

ClearCollect(
GalleryPricingData,
{'ID':1,'Job Category':"",'Entity Type':"",'Job Type':"Advisory",'Standard Invoice Description':"All Entities",'Min. Fee (ex GST)':"Activity Based Costing",'Nominal Value':3000,'Complexity Value':1,Total:3000},
{'ID':2,'Job Category':"",'Entity Type':"",'Job Type':"Compliance",'Standard Invoice Description':"All Entities",'Min. Fee (ex GST)':"Transfer of Business Name - 1 Year (includes ASIC fee)",'Nominal Value':200,'Complexity Value':1,Total:200}
);Clear(GalleryPricingData)

I just added the ID column on the original basis. The function of this step is to define GalleryPricingData. When the APP starts, an empty table named GalleryPricingData will be generated.You can click this button to test it

vbofengmsft_0-1631157008040.png

 2\Add a new record

Collect(
GalleryPricingData,
{'ID':CountRows(GalleryPricingData)+1})

5.gif

vbofengmsft_1-1631157188449.png

 

Best Regards,

Bof

@v-bofeng-msft Think this might solve the problem. Will give it a shot and will let you know. Cheers!

rbalza
Helper IV
Helper IV

@v-bofeng-msft how did you show an empty rows by default? This seems to be the problem in my case. I removed the defaults in my items at the gallery

rbalza_0-1631169336921.png

 

Hi @rbalza :

Here is the setting of my controls in the gallery:

vbofengmsft_0-1631169618097.png

vbofengmsft_1-1631169650005.png

 

Best Regards,

Bof

Hi @v-bofeng-msft thanks for taking the time on this. Really appreciated man. I was actually talking about the items on your gallery. Will accept this as a solution and will lodge another one by the way. Thanks for your effort 🙂

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,884)