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 / Named Formulas Storing...
Power Apps
Answered

Named Formulas Storing Results / Not Re-Calling?

(1) ShareShare
ReportReport
Posted on by 176
I'm curious on when exactly named formulas are evaluated; it seems that for the most part they are evaluated when called, but when attempting to do something like:
 
 
I get the same value even when calling at different times. Would this be better as a function?
Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    69,556 Most Valuable Professional on at
    Named formulas are evaluated in a lazy fashion.  They are only re-evaluated if Power Apps detects a change in one of the parameters.  In your case it has a value for Now and Guid and doesn't detect a change.  As a test try this for a Named Formula
     
    NewTimeStamp = {Value: Testvalue, GUID: GUID()}
     
    Then create a button that increments Testvalue each time the button is pressed.
     
    Set(Testvalue, Testvalue +1)
     
    If you use the Named formula and then press the button and use it again the Value and GUID will change.  Some value in Power Apps needs to change of the named formula will just use the cached values.  If you switch your original value to use a timestamp generated by a timer in the app you fill find that the named formula works the way you expect.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
     
  • BenKraft Profile Picture
    176 on at
    @Pstork1 That makes sense, thanks! I will then likely use a UDF.

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 May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard