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 / Error setting variable...
Power Apps
Unanswered

Error setting variable to form LastSubmit after turning on New analysis engine

(0) ShareShare
ReportReport
Posted on by 412

I recently tried turning on the New analysis engine setting on my application and it then started showing errors in a formula that had previously been working fine.

It seems to object to my setting of a local variable to a form's LastSubmit value in the form's OnSuccess property:

UpdateContext({ locLastRecord: frmClient.LastSubmit });
If(locFormMode = FormMode.New,
 UpdateContext({ locClientTitle: "C" & Right("000000" & locLastRecord.ID, 6) });
 Patch('Client data', locLastRecord, { Reference: locClientTitle } );
 Notify("New client record " & locClientTitle & " created", NotificationType.Success, 1000);
,
 UpdateContext({ locClientTitle: locClientData.Reference });
 Notify("Client record " & locClientTitle & " updated", NotificationType.Success, 1000);
);
... more processing

All references in the code to the locLastRecord variable return an error like: Name isn't valid.  'ID' isn't recognized:

biterbit_0-1713899409009.png

Before the New analysis engine setting was turned on, no errors were generated. Is setting a variable to a form's LastSubmit not a valid action any more, or am I missing something here?

Categories:
I have the same question (0)
  • BhargavPatel Profile Picture
    660 Moderator on at

    @biterbit Try posting your question here, that may be a better place to get it answered. 

  • biterbit Profile Picture
    412 on at

     

    Thanks - I've copied this to the Power Apps Experimental Features forum.

     

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 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard