web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Next and Previous Butt...
Power Apps
Unanswered

Next and Previous Button that Links to Sharepoint Lists

(0) ShareShare
ReportReport
Posted on by 6

Hello all,

 

I am fairly new to Power Apps and am trying to generate an edit card for SharePoint Lists.

 

I want the button to move the data on the card to the next 'ID' from the MS list that is on the share point. The list is titled 'Qual Tracker'.

 

I have tried using these two other forums, but I fully don't understand as I can't get the buttons to work. (Both the save button and the reset button do work successfully from what I can tell)

https://powerusers.microsoft.com/t5/Building-Power-Apps/Button-to-jump-to-the-next-Sharepoint-List-entry/m-p/380843

https://powerusers.microsoft.com/t5/Building-Power-Apps/Form-Next-record-button/m-p/1508797

 

This is one of the examples that I tried to use to make it work but no luck.

 

UpdateContext({varRecord:LookUp('Qual Tracker',ID=varRecord.ID + 1)})

 

KarmaGotMyBack_0-1678681850844.png

 

Categories:
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @KarmaGotMyBack,

    Here is the thing, varRecord could not be referred to in the variable because you will get a blank variable if you don't initialize the variable with a specific record.

     

    The key to your issue is that you should specify a record for the variable, then we could get the next ID based on the formula you provided.

  • KarmaGotMyBack Profile Picture
    6 on at

    How do I do that?

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @KarmaGotMyBack,

    Is this an edit form?

    If so, you could find formula from the Item property of the Info Form, that's record you need to specify.

     

    Generally, we have a Gallery to display all the records, and once we select one record to edit it. If you have this kind of Gallery, you could find the Gallery.Selected from the Item proeprty of the Form.

  • KarmaGotMyBack Profile Picture
    6 on at

    I am sorry, I am not really familiar with this program yet. This Power App was made from the 'customize forums' option under the integrate option in SharePoint. Is that what you mean by an edit form?

     

    Can you show me a picture? 

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @KarmaGotMyBack,

    You mean custom form based on SharePoint list?

    If so, we set the following formula by default:

    If( IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),
     First('*YourListName*'),
     SharePointIntegration.Selected )

    Then, you could specify the varRecord as below:

    UpdateContext({varRecord:If( IsBlank(SharePointIntegration.Selected) ||IsEmpty(SharePointIntegration.Selected),
     First('*YourListName*').ID+1,
     SharePointIntegration.Selected.ID + 1)})
  • KarmaGotMyBack Profile Picture
    6 on at

    Thank you for your patience Qi,

     

    I think I am almost there. I don't get any errors but the next button doesn't do anything. I do already have a sharepoint integration added for the app, don't know if that is redundant in the code, and I am using a gallery for the buttons as shown in the screenshots.

     

    For the default text code, do I put it in the gallery 'default' location? (Image 1)

    And for the UpdateContext coode, do I put it in the 'OnSelect' for the next button? (Image 2)

     

    KarmaGotMyBack_0-1678843077795.png

    KarmaGotMyBack_1-1678843216294.png

     

    Thank you!

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @KarmaGotMyBack,

    Could you please tell me that why you insert buttons within the Gallery?

    The way you configure these buttons in the Gallery seems to be a record, we recgonize one control as a field in a row within the Gallery by default. I am really confused why you configure buttons like that.

     

    Since you have inserted buttons to the Gallery, and there is no other controls within to display records, that's why your Gallery display nothing, it needs controls to display data. And I would strongly suggest you not add buttons to a Gallery, just make them outside of the Gallery.

     

    Here is a solution for your reference based on the above:

    1). Move the buttons outside of the Gallery

    2). Add controls like TextInput/Label into the Gallery to display data by setting ThisItem.FieldName

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard