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 / Powerapp - screen navi...
Power Apps
Answered

Powerapp - screen navigation with current user email

(0) ShareShare
ReportReport
Posted on by

Hello all,

 

I have created a canvas powerapp. when I click Continue button it should navigate to the editscreen and with current user login item should show.

Note: here for one user only one request - no more than one request entered by the user.

how can I achieve that?

I tried using below:

 

Navigate(EditScreen, ScreenTransition.None, {displayItem:Form1.LastSubmit}) 

 

I need the filter with current user email.

 

example: it's showing the last item submitted. but if  user2 submitted the request lastly, then for the user1 also sees the last submitted on only. 

 

please help..

 

Thanks,

Saanv

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,495 Most Valuable Professional on at

    Hi @Saan ,

    I assume you have the user's email in the table.

    LastSubmit will get the last record (as you have stated), however you might try this.

    Set a variable for the user's email (this avoids delegation issues.

    UpdateContext({vEmail:User().Email})

    Filter the records the user has done by ID descending, then get the first one, which is the last one posted by the user.

    FirstN(
     Sort(
     Filter(
     <YourList>,
     <UserEmail>=vEmail
     ),
     ID,
     Descending
     )
    )

    NOTE: If the user has created less than 2000 records, you could Collect the Filter bit and then Sort/FirstN the collection

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more. It also closes the item.

     

  • Saan Profile Picture
    on at

    Hello @WarrenBelz 

     

    Thanks for the reply.

     

    I have tried like below.

    Navigate(EditScreen, ScreenTransition.None, FirstN(Sort(Filter('VendorList',User().Email= 'Created By'.Email),ID,Descending)))

     

    But the error is: Function navigate has some invalid arguments.

     

    My complete goal of this: the user hits on my gallery and item arrow it show redirects to that particular view: thisitem. 

    instead of that when my user clicks on Continue button it needs to directly go to item (as every user has one and only one item) by eliminating the step of navigate(Myitems, none).

     

    Now:

    Continue button --> My item gallery(contains only one item for every user) -- > click on gallery item arrow --> navigates to edit item of that edit screen

    I need:

    Continue button -->navigates to edit item of that edit screen

     

    Thanks 

    Saanv.

  • Saan Profile Picture
    on at

    All,

     

    Can any one guide me on this, kind of lil urgent

     

    Many thanks for your help in an advance!!!

     

    Saanv

  • WarrenBelz Profile Picture
    155,495 Most Valuable Professional on at

    Hi @Saan ,

    Sorry I did not see your last post - I will have a look now

  • Verified answer
    WarrenBelz Profile Picture
    155,495 Most Valuable Professional on at

    Hi @Saan ,

    My apologies - I was really giving some guidance on how to approach things. I will now try to explain the logic.

    Firstly, the code I gave returns the last record the current user has posted

     

    FirstN(
     Sort(
     Filter(
     'VendorList',
     <UserEmail>=vEmail
     ),
     ID,
     Descending
     )
    )

     

    This is the record the user saved last, however it returns a table with one record (the one you want) in it.

    The other thing you need to do to avoid "Delegation" issues is to set a Variable for the User's email - this can be done at App start, but I will do it before the screen transition below.

    The last bit is that the resulting record has to be in the Items property of the form with one more trick - because it is a table, you have to tell PowerApps which record to display. As you know there is only one, you use the first. So Putting it all together:

    Your transition to the screen

     

    Set(
     vUserMail,User().Email
    );
    Navigate(
     EditScreen, 
     ScreenTransition.None
    )

    Now the Items property of the form on the screen should be

    First(
     FirstN(
     Sort(
     Filter(
     'VendorList',
     'Created By'.Email = vUserMail
     ),
     ID,
     Descending
     )
     )
    )

     

    So to put some logic around this (you have to read formulas from the inside first):-

    1. You are filtering the Vendor List to show only records the current user has created
    2. You then sort that list by ID descending
    3. You then take the first record in this set (which of course is the last one written)
    4. You then send the table to the form and tell it to display the first record (as it will not display a table - that is what galleries are for)

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more. It also closes the item.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 414

#2
Valantis Profile Picture

Valantis 387

#3
timl Profile Picture

timl 344 Super User 2026 Season 1

Last 30 days Overall leaderboard