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 / Variable set not being...
Power Apps
Unanswered

Variable set not being detected

(1) ShareShare
ReportReport
Posted on by 149

I am having a strange problem, I have not used power apps in a couple of months and there seems to have been some updates. 

 

I want to patch additional data to the last submitted list item.

 

On the "On Success" property of the form I have this. It is not detecting the variable I have set 2 lines up, this is very strange, I cant get my head around it. 

 

Set(formid_handover, Form2.LastSubmit.ID);

Patch('Shift Handover Form List',
 LookUp('Shift Handover Form List', ID = formid_handover),
 {'Aircraft List ID': currentAircraftID
 });

Navigate('View BOW')

 

I have a lot of working apps this way. 

 

Thanks for your help. 

Categories:
I have the same question (0)
  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    hi @lukegatt ,

    try to use Set after the Patch function

  • lukegatt Profile Picture
    149 on at

    No that won't work how can you call a variable set in the next statement?

  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at
    Patch('Shift Handover Form List',
     LookUp('Shift Handover Form List', ID = formid_handover),
     {'Aircraft List ID': currentAircraftID
     });
    Set(formid_handover, Form2.LastSubmit.ID);
    Navigate('View BOW')

    @lukegatt  have you tried this?

  • lukegatt Profile Picture
    149 on at

    Yes I have, how can you lookup on a field which does not exist yet?

  • lukegatt Profile Picture
    149 on at

    In the OnStart property of the app I set Set(formid_handover, 0) and it worked, looks like a bug to me. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 883

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 477

Last 30 days Overall leaderboard