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.
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!
Solved! Go to Solution.
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
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);
@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
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
277 | |
241 | |
83 | |
37 | |
35 |
User | Count |
---|---|
357 | |
243 | |
128 | |
73 | |
46 |