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

on edit of list item of sharepoint list , it displays first item instead of current item

I have customized  sharepoint list and saved it and published it, when the list item is opened in edit mode , then the form displays the first item present in list,  how to solve it?

1)i have used refresh (datasource) but it does not work

 

14 REPLIES 14
Highlighted
Super User
Super User

Re: on edit of list item of sharepoint list , it displays first item instead of current item

@Tejaswini1234 

What code is being used in the Item property of your Form?  Does it look similar to mine?  Please share your code.

 

If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),First(your_SP_list_name),SharePointIntegration.Selected)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

Highlighted
New Member

Re: on edit of list item of sharepoint list , it displays first item instead of current item

 written following code on item property  of sharepoint form

 

If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),First([@testlist]),SharePointIntegration.Selected)

Highlighted
Super User
Super User

Re: on edit of list item of sharepoint list , it displays first item instead of current item

@Tejaswini12345 

Is it possible you have not made any selection and that is why you are getting the FIRST record?  How does the user browse to your form?  Through a link or by clicking on the item in the SP list and then clicking edit? 

 

You'll notice that when this condition is True...

 

IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected)

 

...then this is the result

 

First([@testlist]),

 

 

 

Highlighted
Helper IV
Helper IV

Re: on edit of list item of sharepoint list , it displays first item instead of current item

by clicking on the item in the SP list and then clicking edit

Highlighted
Super User
Super User

Re: on edit of list item of sharepoint list , it displays first item instead of current item

@Tejaswini1234  @Tejaswini12345 

What code is in the OnEdit property of your Sharepoint Integration?

 

Highlighted
Helper IV
Helper IV

Re: on edit of list item of sharepoint list , it displays first item instead of current item

Following code on onedit of sharepoint integration

EditForm(SharePointForm1)

Highlighted
Super User
Super User

Re: on edit of list item of sharepoint list , it displays first item instead of current item

@Tejaswini1234 

Did you have a previous working version of the form?  If yes, can you roll-back?

 

Link To Relevant Forum Post

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/SharePoint-list-PowerApps-form-not-...

Highlighted
Helper IV
Helper IV

Re: on edit of list item of sharepoint list , it displays first item instead of current item

sharepoint integration datasource property: [@testlist]

On cancel  :ResetForm(SharePointForm1)

onEdit: EditForm(SharePointForm1)

OnNew: NewForm(SharePointForm1)

OnSave :SubmitForm(SharePointForm1)

OnView: ViewForm(SharePointForm1)

sharepoint form  datasource property: 

sharepoint form item property:[@testlist]

If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),First(testlist),SharePointIntegration.Selected)

Highlighted
Helper IV
Helper IV

Re: on edit of list item of sharepoint list , it displays first item instead of current item

i have  just customized newly , i dont have any previous version of form

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (9,630)