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 / Navigate() taking me t...
Power Apps
Unanswered

Navigate() taking me to older submitted tickets, not the one being submitted.

(0) ShareShare
ReportReport
Posted on by 12

I'm attempting to navigate to the ViewTicketScreen for the ticket being submitted, so that a PDF can automatically be emailed upon submittal. Here is the code I currently have:

 

 

Collect(
 'FCR SKU List',
 col_SKUs
);
SubmitForm(Form2);
ResetForm(Form2);
ResetForm(Form2_1);
Set(RunFlow,true);
Clear(col_SKUs);
ClearCollect(
 AllTickets,
 'RequestTickets'
);
Navigate(ViewTicketScreen,ScreenTransition.Fade);

 

 

The problem is that when I am navigated to the ViewTicketScreen, it is taking me to an older ticket and not the one currently being submitted.

Categories:
I have the same question (0)
  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @lgotro 

    Condider this:

    1. Ticket Identification: Ensure that the ViewTicketScreen is set up to display the most recent ticket. It might be defaulting to a certain ticket based on how it's fetching data. Check the logic or formula used to retrieve the ticket details on this screen.

    2. Timing of Navigation: The Navigate function is being called right after the SubmitForm function. There might be a slight delay in the form submission and the creation of the ticket, causing the navigation to occur before the new ticket is fully processed. Consider adding a delay or a confirmation step that ensures the ticket is submitted before navigating.

    3. Global Variable or Context: After submitting the form, you could set a global variable or a context variable with the ID or details of the newly created ticket. Then, on the ViewTicketScreen, use this variable to fetch and display the correct ticket.

    4. Check the 'AllTickets' Collection: After you collect the 'AllTickets' from 'RequestTickets', make sure that the collection is updated correctly with the latest ticket. There might be a lag or issue in how the data is being refreshed.

    5. Screen Refresh: Ensure that the ViewTicketScreen is refreshing its data upon activation. Sometimes screens might hold onto old data if not explicitly refreshed.

    6. Debugging: Use debugging techniques like printing the ID or details of the ticket you're expecting to view right before the Navigate function is called. This can help confirm if the issue is with the navigation timing or with how the ViewTicketScreen retrieves the ticket.

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • lgotro Profile Picture
    12 on at

    (1, 4, 5): The way the ViewTicketScreen currently works is that a ticket is selected from the MyTicketsScreen: 

     

    Select(Parent);
    Navigate(ViewTicketScreen,ScreenTransition.Fade)

     

     

    (2): When testing, I moved my Navigate() destination to the MyTicketsScreen and the newest ticket appears at the top, so the function below is updating quickly enough that it is reflected when landing on the destination.

    ClearCollect(
     AllTickets,
     'RequestTickets'

     

    I still need to explore your other solutions (3, 6) and see if they provide me with any results!

  • lgotro Profile Picture
    12 on at

    @mmbr1606 

     

    I was able to resolve the issue by setting the SelectedTicket to the ticket being created prior to the Navigate() function.

     

    See the revised code below:

     

    Collect(
     'FCR SKU List',
     col_SKUs
    );
    SubmitForm(Form2);
    ResetForm(Form2);
    ResetForm(Form2_1);
    Set(RunFlow,true);
    Clear(col_SKUs);
    ClearCollect(
     AllTickets,
     'Forecast Change Requests'
    );
    /*SOLUTION HERE*/
    Set(
     SelectedTicket,
     Last(
     AllTickets
     )
    );
    
    Navigate(ViewTicketScreen,ScreenTransition.Fade);

     

    Thanks a million for your input. You definitely led me in the right direction.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 400 Most Valuable Professional

#2
11manish Profile Picture

11manish 141 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard