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 / UDF prevents automatic...
Power Apps
Unanswered

UDF prevents automatic reevaluation of other (non UDF) formula (Custom Page)

(1) ShareShare
ReportReport
Posted on by 2
When UDF is enabled in (custom page) settings, existing (non UDF) formula which reference a variable* stop automatically reevaluating when the referenced variable is changed.
(*Variable is of type record but unsure if that is a factor in the issue.)
 
Find below an extract of the App Formulas.
SelectedTheme is used in subsequent colour formula and is based on the variable, gblSelectedTheme, which is set by a gallery select.
When UDF is enabled in (custom page) settings, the change of SelectedTheme is not propagated to the controls bound to the subsequent colour formula e.g. PrimaryColour.
(You can see my UDF experiment with the commented out ColourHex UDF.)
Reevaluations of all formula and update of bound controls all works as expected without UDF enabled in settings.
 
SelectedTheme = If(IsBlank(gblSelectedTheme), First(colThemes), gblSelectedTheme);
 
//ColourHex(Colour:Color):Text = Match(JSON(Colour, JSONFormat.IgnoreUnsupportedTypes), "#[a-fA-F0-9]{6}").FullMatch;
PrimaryColourHex = Match(JSON(PrimaryColour, JSONFormat.IgnoreUnsupportedTypes), "#[a-fA-F0-9]{6}").FullMatch;
ControlColourHex = Match(JSON(ControlColour, JSONFormat.IgnoreUnsupportedTypes), "[a-fA-F0-9]{6}").FullMatch;
 
PrimaryColour = If(sliderPrimaryFadeLevel.Value = 0, SelectedTheme.PrimaryColour, ColorFade(SelectedTheme.PrimaryColour, (sliderPrimaryFadeLevel.Value / 100)));
ControlColour = If(IsBlank(SelectedTheme.ControlColour), ControlColourDefault, SelectedTheme.ControlColour);
PrimaryColourLight = ColorFade(PrimaryColour, LighterFade);
PrimaryColourExtraLight = ColorFade(PrimaryColour, ExtraLightFade);
PrimaryColourDarker = ColorFade(PrimaryColour, DarkerFade);
PrimaryTextColour = If(IsBlank(SelectedTheme.PrimaryTextColour), PrimaryTextColourDefault, SelectedTheme.PrimaryTextColour);
HintColour = If(IsBlank(SelectedTheme.HintColour), ColorFade(PrimaryColour, 60%), SelectedTheme.HintColour);
Categories:
I have the same question (0)
  • adithyaselv Profile Picture
    Microsoft Employee on at
    Hi , Can you please share a minimal app (.msapp file) in which this issue can be reproduced. Also, please share the PowerApps Authoring version you are currently using from the setting menu in edit mode.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard