cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Is it possible to move between multiple elements without changing selected property box?

Straight off the bat, sorry if this is the wrong place, or if it's being answered a million times. I am not even sure how to search for this. I have tried, and nothing comes up.

 

I am creating PowerApps that have many fields and text boxes that I tend to adjust the format or astetics of in batches as the app evolves. This means I might decide the fill needs to change slightly when a field is seleceted. So I need to go to each item that needs to be adjusted, and change the Fill element. However, the element selected when I go to an item is whatever it was the last time I was on there.

 

Is there any way to have the element selection stay the same as I move through the app, and only change if I manually change it? So if I want to change the Fill in lots of boxes I can just move between them as I wish, and then change it to Color and change that across them too, etc.

Is this possible?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Is it possible to move between multiple elements without changing selected property box?

@adoyle5 

Great question!  We can still make due with a similar approach.

I would put this code in the OnStart property of your app.

 

Set(
    MilestoneStyles,
  {
    Status: "Open", FillColor: Red,
    Status: "In-Progress", FillColor: Yellow,
    Status: "Complete", FillColor: Green
  }
)

 

Then I would use this code in Fill property for each Milestone status

 

LookUp(MilestoneStyles,Status=MilestoneStatus1.Text,FillColor)

 

Now you only have to change the fill color in one place for the entire app!

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

6 REPLIES 6
Highlighted
Super User III
Super User III

Re: Is it possible to move between multiple elements without changing selected property box?

@adoyle5 

This is an important question!  Changing the properties of a controls in an app is a very time consuming exercise.  You'll want to do everything you can to make adjustments in a single place rather than individually in each item.

 

Let's say you have a Text Input whose style should remain consistent throughout the app. It has the following properties.

Border: RGBA(0,0,0,1)
Color: DarkBlue
Fill: RGBA(255,255,255,1)
Size: 16

 

We can make the app creation process more efficient by storing the style settings in a variable.  Put the following code in the OnStart property of your app

Set(StyleSettings,
  {
    TextInputBorder: RGBA(0,0,0,1)
    TextInputColor: DarkBlue
    TextInputFill: RGBA(255,255,255,1)
    TextInputSize: 16
  }
)

 

Now go back to your TextInput and change the properties to the variables shown below.

Border: StyleSettings.TextInputBorder
Color: StyleSettings.TextInputColor
Fill: StyleSettings.TextInputFill
Size: StyleSettings.TextInputSize

 

Repeat this approach across all of your TextInputs.  If a style change is needed all you have to do is update the setting in OnStart and then Run App OnStart to see the changes take effect.

 

You can save yourself even more time when creating TextInputs by copying an existing one that already has the StyleSettings variables loaded.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

Highlighted
Helper I
Helper I

Re: Is it possible to move between multiple elements without changing selected property box?

Hello mdevaney,

 

I knew this was possible somehow, but never thought of an efficient way to do it. Thank you for explaining that, and for explaining it so well. This is deffinatly a soultion. However, my specific issue is a little more complicated, if you'll endulge me?

 

I have Milestones, ten of them, and ten Milestone statuses. These are just text labels where the .Text is a lookup to get the value. For each of the Statuses, I have the .Fill and .Color change based on the value of itself. To do this, I need to reference itself in each one.

For example:

MilestoneStatus1 .Fill is: 

If(
    (MilestoneStatus1.Text) = "Complete",
    Green,
    If(
       ...etc.

MilestoneStatus2 .Fill is the same except it looks up MilestoneStatus2.Text, etc.

 

With this setup, I cannot use your suggestion, as each Label still needs to have a hand specified field to check and what to look for. I recently changed this from "Green" to "Complete" meaning I had to change each colour option in 20 places (10x .Fill and 10x .Color).

 

I hope that makes sense? If I can still use your suggestion in this manner, that would be brilliant! I just can't see how.

 

Highlighted
Super User III
Super User III

Re: Is it possible to move between multiple elements without changing selected property box?

@adoyle5 

Great question!  We can still make due with a similar approach.

I would put this code in the OnStart property of your app.

 

Set(
    MilestoneStyles,
  {
    Status: "Open", FillColor: Red,
    Status: "In-Progress", FillColor: Yellow,
    Status: "Complete", FillColor: Green
  }
)

 

Then I would use this code in Fill property for each Milestone status

 

LookUp(MilestoneStyles,Status=MilestoneStatus1.Text,FillColor)

 

Now you only have to change the fill color in one place for the entire app!

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Highlighted
Helper I
Helper I

Re: Is it possible to move between multiple elements without changing selected property box?

Wow. Thank you @mdevaney !

 

You have no idea how happy this makes me!

You are amazing!

Highlighted
Super User III
Super User III

Re: Is it possible to move between multiple elements without changing selected property box?

@adoyle5 

You are most welcome.  Thought provoking questions like this one keep me interested for sure!

Highlighted
Helper I
Helper I

Re: Is it possible to move between multiple elements without changing selected property box?

I would like to round this off though with: I would still appreciate being able to keep the element dropdown the same selection in all as I move around the app. I think it would be a good feature to add as an option in the future.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,827)