cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
J0nas
New Member

Navigate to specific record of a SharePoint list.

I'm using powerapps to change the form (form 1) in a SharePoint list (list 1).

On the form there's a button to submit the data and go to a new screen (form 2) where I can create records in a different SharePoint list (list 2).

J0nas_0-1643990826824.png

In list 2 there's a field which has the value of the ID of the original record of list 1, so this is the link between the 2 lists.

On form 2 I have a button to return to form 1, but I can't find how to return to the record I just created. It always returns to the first record in list 1.

J0nas_1-1643990935850.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@J0nas 

Your form (with that formula on the Items) will only show the Selected record in your list or, the first one.

 

On the OnSuccess action of your form, add the following:

Set(glbCurrentRecord, Self.LastSubmit)

 

Then change your Item property to:

Coalesce(
    glbCurrentRecord;
    SharePointIntegration.Selected;
    First(List1)
)
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

4 REPLIES 4
RandyHayes
Super User
Super User

@J0nas 

What is the Item property of your first form?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected);First([@'List1']);SharePointIntegration.Selected)

I've tried changing 'First' to 'Last', but that didn't work. So far it only works if you select the record you want to edit. If it's a new record you have to create it first and then select it manually, but I want it automatically selected.

RandyHayes
Super User
Super User

@J0nas 

Your form (with that formula on the Items) will only show the Selected record in your list or, the first one.

 

On the OnSuccess action of your form, add the following:

Set(glbCurrentRecord, Self.LastSubmit)

 

Then change your Item property to:

Coalesce(
    glbCurrentRecord;
    SharePointIntegration.Selected;
    First(List1)
)
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thank you! You're brilliant.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,015)