cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
joshieboy
Helper III
Helper III

Edit form showing the same record all the time

I need help with my Edit Form.  Somehow, no matter which record I edit, the edit form is showing data for the first record in my SharePoint list and not for the current record I am trying to edit.  I am not sure if there is some reset function or something that can be causing this.  I also created a deep link from my SharePoint list so that users editing items in the list, will open the form in PowerApps edit mode, and this also opens the app with the same record all the time.  Any help to fix this will be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@joshieboy 

So you mention that the Item property is: BrowseGallery1.Selected

And that this Works when you come from the search screen.  So, you then only have it set to get its Item from one place.

If you're going to work with multiples, then I would suggest implementing a snapshot variable at this point.

In the OnSelect action of all the Galleries in question, add : Set(glbCurrentRecord, ThisItem)

Then set the Item property of your form to: glbCurrentRecord

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

9 REPLIES 9
RandyHayes
Super User III
Super User III

@joshieboy 

What is the Item property of your EditForm?  This will determine what item it is editing.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Hi @RandyHayes 

The Item property is BrowseGallery1.Selected

RandyHayes
Super User III
Super User III

@joshieboy 

So you're stating that you have a BrowseGallery1 that you click on an item and then, in the OnSelect of either the Gallery or some icon/button in your Gallery you have this: EditForm(yourFormName); Navigate(yourFormScreen)

 

And the Item property of the Form is BrowseGallery1.Selected and you are NOT seeing that record?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

@RandyHayes 

That is correct.  My EditRecord screen has one record saved into all of the fields, and it appears that whichever record I try to edit, displays this one record and not the values for the one I am editing at the moment.  I am not sure how to reset this so it displays the record in question. 

The strange thing is I have a search screen canvas and the edit button OnSelect properties for it are:  EditForm(EditForm1);Navigate(EditScreen1, ScreenTransition.Fade) and this works well from that screen and opens the relevant record for editing, but I am trying to setup a work queue for users to see only those records assigned to them, and also use deep linking in SharePoint so that it can be opened in PowerApps from SharePoint.  The edit icon in my work queue has the same formula as above, yet it still displays the one record on the Edit form and not the current one being edited.

@RandyHayes  - upon further investigation I am seeing that the edit form is showing the very first record stored in the SharePoint list.  No matter which record I try to edit from PowerApps, its taking the values of the very first record submitted.

Drrickryp
Super User II
Super User II

@joshieboy 

Try Lookup(Splist,ID=BrowseGallery1.Selected.ID) in the Item Property of the form.

@Drrickryp  - thanks.  Still not working.  Are there any facilities to do a screen share of what I am doing?  

RandyHayes
Super User III
Super User III

@joshieboy 

So you mention that the Item property is: BrowseGallery1.Selected

And that this Works when you come from the search screen.  So, you then only have it set to get its Item from one place.

If you're going to work with multiples, then I would suggest implementing a snapshot variable at this point.

In the OnSelect action of all the Galleries in question, add : Set(glbCurrentRecord, ThisItem)

Then set the Item property of your form to: glbCurrentRecord

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Thank you @RandyHayes - this worked.  Also, thanks all for the assistance and feedback on this item.  Appreciated.

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (72,843)