cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anabananei
Resolver I
Resolver I

Form in current screen not updating after Submit

Hello,

 

I have a gallery on Screen 1 with the Items set to a data source from a SharePoint list. I set the OnSelect property to 

 

 

Set(varitem, ThisItem);Navigate(Screen2,Fade)

 

 

On my Screen2, I need to pass the Selected item to the Form, I set the Items property to 

 

 

varitem

 

 

All is well, the forms are loading whenever I select an item from a gallery. However, when I tried to Edit the form, make my changes and submit, the values from the fields that I changed did not reflect on the Form Screen. Instead, I have to navigate back to my Gallery Screen and select the item again before it reflects the changes. Majority of my apps uses the same functions but this is the first time I encountered this issue.

 

  1. I took different approach, such as adding a Refresh button after From was submitted - values still not reflecting
  2. I tried replacing the global variable with contextual variable passing through the navigation function - still not resolved
  3. I ensured the DelayLoading in the advance setting is turned On - still not resolved
  4. Changed the Items property of the Form to 

 

 

Gallery1.Selected​

 

This actually resolved the issue but its giving me a performance warning: Inefficient delay loading, it needs to be passed to a variable. I tried that but still not resolved.

 

In summary, whenever I pass the value from a variable to a form, the values I changed in the form is not reflecting in the FormScreen realtime. I have to navigate back to the previous screen for it to reflect. My previous apps works just fine, but the succeeding apps that I created is experiencing this problem.

 

Let me know your insights.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @anabananei ,

 

That is because you saved the entire selected record (static) into the variable as the items of form, since the variable is static until you re-trigger it, so it doesn't reflect the latest modification.

The workaround is easy, try to use LookUp function to retrieve the record back from SharePoint list and apply into Form.Items property. 

LookUp('SP list', ID=varItem.ID)  //Form.Items propety

Hope this helps.

Sik 

View solution in original post

4 REPLIES 4
Alex_10
Super User
Super User

What if you try this:

 

if you use SubmitForm() to save edited record:
SubmitForm(YourForm);
Set(varitem, YourForm.LastSubmit);
ResetForm(YourForm);

if you use Patch() to save edited record:
Set(varitemid, varitem.ID);

Set(varitem, Patch(YourForm, LookUp(YourForm, ID = varitemid),{...});
ResetForm(YourForm);

krishnags
Super User
Super User

@anabananei  it might be due to the cache issue. Try this - this helps you to have the context information of the selected record and use varItem as per your requirement in Screen2

Navigate(Screen2,Fade,{varItem:ThisItem})

 

Hello I tried this as well but it does not resolve my issue.

Hi @anabananei ,

 

That is because you saved the entire selected record (static) into the variable as the items of form, since the variable is static until you re-trigger it, so it doesn't reflect the latest modification.

The workaround is easy, try to use LookUp function to retrieve the record back from SharePoint list and apply into Form.Items property. 

LookUp('SP list', ID=varItem.ID)  //Form.Items propety

Hope this helps.

Sik 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

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 the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (57,365)