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

Conditional formatting based on Data Source values in a Vertical Gallery

Hi folks. 


I'm starting to play around with PowerApps and have hit a sticking point. I am building a PowerApp to show data about various software development tasks. I'm listing some of those tasks in a Gallery (you can see this in the screenshot below)

 

2017-02-28 15_19_36-PowerApps.jpg

 

I want to be able to have the subtitle where you can see "High" or "Project" written, to have a different color (font or background) depending on whether the value is project, or high, or some other value.  I'm really stuck as to where to put this conditional formatting. I can find examples of conditional formattnig for DataCards, but I've not used DataCards yet. I'm an experienced C# programmer so comfortable with concepts around coding, but this part of PowerApps has me mystified. 


Any help appreciated. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Apps
Power Apps

Re: Conditional formatting based on Data Source values in a Vertical Gallery

Hi James,

 

Could you give this a try?:

- Click on the control you'd like edit - in this case on the Text box for subtitle

- Click "Advanced" on the right side and see the Fill property there.

- Enter any conditional expression there such as  if(Column1  = "High",  Red, Blue)

- You can apply the same logic to change the font color by using the Color property.

 

 Please let us know if this doesn't help. Thanks!

 

View solution in original post

3 REPLIES 3
Highlighted
Power Apps
Power Apps

Re: Conditional formatting based on Data Source values in a Vertical Gallery

Hi James,

 

Could you give this a try?:

- Click on the control you'd like edit - in this case on the Text box for subtitle

- Click "Advanced" on the right side and see the Fill property there.

- Enter any conditional expression there such as  if(Column1  = "High",  Red, Blue)

- You can apply the same logic to change the font color by using the Color property.

 

 Please let us know if this doesn't help. Thanks!

 

View solution in original post

Highlighted
Helper V
Helper V

Re: Conditional formatting based on Data Source values in a Vertical Gallery

Hi SinanE, that worked a treat! Here's a quick test I did just to check and what do you know, it worked a treat! 🙂 

 

Here's a screenshot that may help others working with this

 

https://s18.postimg.org/s8nr0nr2h/2017_02_28_20_23_04_Store_Applications_Power_Ap.png

 

(I couldn't use my work data source data as I'm working at home without a VPN connection, but a local test using a Trello connection worked and I'm assuming I can apply the same logic). 


Thanks so much SinanE. My next challange (that once I understand I think will unlock the potential of PowerApps even more) is how to work with variables. For instance. 

 

- Create a Data Source that gets a count of tasks from the database. Let's say I have 10 tasks. 

- Be able to create a text box on the main form that displays 'You have 10 tasks' but the property is really 'You have <variable> tasks' displayed. I know that we're supposed to use ContextVariables I think? But I haven't worked out where to actually 

 

1. Obtain that 'value' from my data source

2. WHere to actually write out that I want to pass that value to a variable

3. Structure the text box to include that value/variable. 

 

As I mentioned, I'm really comfortable working with C# so I know what I "want" but with PowerApps it's about understanding where you have to input these types of things within the application design to get them to work as there's no classic 'classes' or 'code pages' to work with (which is great because it allows non-coders to work with it, but for coders it can be a little harder to get ones head around :). 

 

Once again, thank you!

Highlighted
Frequent Visitor

Re: Conditional formatting based on Data Source values in a Vertical Gallery

This worked for me.

 

A simple if statement within the Fill field did the job.

 

Thank you,

luke

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (6,486)