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 / Set Global Control Values
Power Apps
Unanswered

Set Global Control Values

(2) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

A bit of a question and pet peeve that I think can make PowerApps a less attractive option for app development at times.

 

I can't see how it's possible to set global values for controls i.e. a radio button in a SharePoint form. Any new radio button I add to my app comes loaded with FalseText of 'Off' and TrueText of 'On'. In 99% of my circumstances, I want this to say 'Yes' or 'No' so what I have to do is unlock all data cards and customise the False/True text.

 

This is incredibly time-consuming on longer forms; realistically I'd expect there to be a way to set these values and then overwrite in the small number of circumstances where I'd need something else i.e. how inline-styles can override CSS.

 

Am I missing something because I haven't seen anything on the ideas board or forums that suggest this is possible.

 

To clarify, I am using global variables for some fields i.e. for a multi-line text box I have a height variable but again, rather than being able to set this once and then overwrite where necessary I have to edit each individual box which starts to get both tedious and laggy over time!

 

Any thoughts/ideas/suggestions?

Categories:
I have the same question (0)
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Anonymous 

     

     

    I have a height variable but again, rather than being able to set this once and then overwrite where necessary I have to edit each individual box which starts to get both tedious and laggy over time!

     

     

    Instead of variable, we suggest you have a "Hidden Screen" and have hard coded control values there.

    From other screens, add other controls with properties that directly reference the control properties of your "base" control on the "Hidden Screen".

     

    E.g. 

     

    1. Add a new screen called MasterScreen
    2. In that screen, add some control, called it MyMasterControl1
    3. Set properties manually (hard coded)
    4. From other screens, from other controls, reference property such as like this:
      MyMasterControl1.Height

     

    Instead of setting variables all the time for control properties, try this above instead and see if it is better for you.

  • Mike2500 Profile Picture
    1,247 Super User 2024 Season 1 on at

    To take this a bit further, controls could be added via copying the master controls. While this has its own issues, I find it is helpful in some scenarios. Though, ultimately, OP is right in that its confusing why a new forms tool doesn't support something like CSS, or at least give us some sort of "theme" capability like visual studio had 20 years ago. (or, how about a format painter like word had over 25 years ago). 

     

    One thing that may help is grouping. You can group controls, and then set common properties. Though, this doesn't work for forms. 

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Anonymous  

     

    Yes, as @Mike2500  said, copying and pasting the control itself can be helpful.

     

    You would usually want to do this after making the Master control, making one instance of the control, and then it would be that instance (the one where you edit the properties to reference the master properties) that should be copied and pasted, so that each instance of the control references the same Master control properties.

     

    However, the definition of this first instance of each type of control, can be tedious at times.

     

    We had an idea we submitted where we thought it would be nice to be able to take a hard coded control, and clone a copy of it that already had all the MasterControl.Property values initialized. Then we could go through and decide which properties should be unique to the instance. Because this process can be tedious to do manually to do this for the BorderStyle, the X, the Y, the Height, and all the other number of properties

    PowerApps Studio: One-Click Master Element Instance Reference 

     

    Also, yes it might be nice to have other theme related capabilities as well in addition to the above.

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

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

#2
11manish Profile Picture

11manish 193

#3
Valantis Profile Picture

Valantis 138

Last 30 days Overall leaderboard