cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Gallery no update

Hi,

May I know that why can not see the updated data once I have submitted or updated a form data? No matter change or update in text box or drop down list.

Although the record has been updated in the share point list,but not in power app gallery.

It can shows once I click the refresh button the browser only.

 

Thanks

15 REPLIES 15
Highlighted
Super User II
Super User II

Re: Gallery no update

Hi @ivanlawcy 

 

If you want it to automatically refresh, you will need to insert a Refresh() action after your submit action or else have one during the OnVisible property of your gallery screen.

 

Kind Regards,

ManCat


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Highlighted
Super User III
Super User III

Re: Gallery no update

Hi @ivanlawcy ,

It is for the reason you have almost said. You need to refresh the data source for PowerApps to display any updated or added record in a gallery based on that data source.

If you add Refresh(DataSource) - substitute your list name for DataSource - on the end of the code for the save button, it will refresh automatically.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Highlighted
Helper II
Helper II

Re: Gallery no update

I have try both methods but I still can not get. Currently I also do not what I can do.
Any others ideas?
Thanks
Highlighted
Super User III
Super User III

Re: Gallery no update

Hi @ivanlawcy ,

Can you please give me the code you use to save the data and the name of the list you are writing to.

Highlighted
Helper II
Helper II

Re: Gallery no update

Two Submit button interact with the list as below :

Button 1:

If(varTab = "Info",
If(varHod<>Office365Users.MyProfileV2().displayName&&DataCardValue5.Text=Office365Users.MyProfileV2().displayName,SubmitForm(formEClaim);Refresh(ExpensesClaimPortal);Set(varId,formEClaim.LastSubmit.ID););Set(varTab,"Transactions");Set(varActa,"new");NewForm(formTrans);Navigate(scnECSummary_u,ScreenTransition.None);
,If(varHod=Office365Users.MyProfileV2().displayName,Set(varTab,"Approval");EditForm(formApproval);Refresh(ExpensesClaimPortal);))

 

This is button 2 :

If(varTab = "Approval",Set(varTab,"Total");SubmitForm(formApproval);Refresh(ExpensesClaimPortal);EditForm(formTotal);Navigate(scnECSummary_h,ScreenTransition.None),If(formEClaim.Mode=FormMode.Edit&&(varE=Office365Users.MyProfileV2().displayName||varHod=Office365Users.MyProfileV2().displayName),Set(varTab,"Approval");,Set(varTab,"");SubmitForm(formTotal);Refresh(ExpensesClaimPortal);Navigate(scnECSummary_f,ScreenTransition.None)));

 

The form screen are same as below :

 

form.png

 

I applied different tab for different form. Any ideas?

Thanks

Highlighted
Super User III
Super User III

Re: Gallery no update

Ok @ivanlawcy ,

I must admit I was not expecting something the size of what you sent.

I have parsed it below - can you please confirm the logic runs in the indents I have made.

If(
   varTab = "Info",
   If(
      varHod<>Office365Users.MyProfileV2().displayName &&
      DataCardValue5.Text=Office365Users.MyProfileV2().displayName,
      SubmitForm(formEClaim);
      Refresh(ExpensesClaimPortal);
      Set(varId,formEClaim.LastSubmit.ID);              //last semi-colon?
   );
      Set(varTab,"Transactions");
      Set(varActa,"new");
      NewForm(formTrans);
      Navigate(scnECSummary_u,ScreenTransition.None);    //last semi-colon?
,
   If(
      varHod=Office365Users.MyProfileV2().displayName
   ,
      Set(varTab,"Approval");
      EditForm(formApproval);
      Refresh(ExpensesClaimPortal);
   )
)


If(
   varTab = "Approval",
   Set(varTab,"Total");
   SubmitForm(formApproval);
   Refresh(ExpensesClaimPortal);     //I assume formApproval writes to ExpensesClaimPortal
   EditForm(formTotal);
   Navigate(scnECSummary_h,ScreenTransition.None)
,
   If(
      formEClaim.Mode=FormMode.Edit && 
      (
         varE=Office365Users.MyProfileV2().displayName || 
         varHod=Office365Users.MyProfileV2().displayName
      )
   ,
      Set(varTab,"Approval");
,
   Set(varTab,"");
   SubmitForm(formTotal);
   Refresh(ExpensesClaimPortal);
   Navigate(scnECSummary_f,ScreenTransition.None)
   )
)

Also without trying to get my mind around your structure, have you tired simply refreshing both data sources unconditionally?

Highlighted
Helper II
Helper II

Re: Gallery no update

This is because they are not update,so I try to refresh once they do submit.

All the form here are related to the data source. For those unconditionally refresh is due to maybe user want to go to summary page instead of continue submit form. Therefore I try to refresh data source for every button clicked. 

Hope you understand that how despite about this refresh updated data.

 

Thanks

Highlighted
Super User III
Super User III

Re: Gallery no update

Ok @ivanlawcy ,

Refreshing a data source is a fundamental function and should display the result on any form or gallery on which it is based, so there has to be something we are missing here. What is the Item property of the form and/or Items property of the gallery where you are not seeing the data?

Highlighted
Helper II
Helper II

Re: Gallery no update

It will be a gallery and no matter update a dropdown or text box.
Then?

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,786)