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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard