cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Serviced2000
Helper IV
Helper IV

Format Labels Based on a Template

Hi Everyone,

 

I am building a power app with a page that will eventually have > 100 labels on it. The reason for the large number of labels is that we are trying to highlight the differences between an old record and an updated one, but we only want to modify the text and format of the label if there is a difference between the two. What we want to end up with is something like this:

 

Serviced2000_0-1658795981570.png

I can do this with a formula, no problem but I have run into the issue of having too many controls on a page before and I'm concerned that having three formulas determining formatting and content for each of > 100 labels will heavily impact on the apps performance. 

 

I'm trying to find out if there is a way I can set a template for the format (something that sets out the text and fill colours for example) that is applied if there is text in the label. That way I only have to specify a formula to add text to each label.

 

Not sure if this is possible or even if I'm describing this particularly well but any advice will be welcomed.

 

Thanks!

 

7 REPLIES 7
BlessedCobba
Responsive Resident
Responsive Resident

Seems like a perfect candidate for galleries to me? 
populates a list from a data source and allows your to create a template of how every row is displayed? 

Serviced2000
Helper IV
Helper IV

Thanks @BlessedCobba - my original version of this app used a gallery for all the items but the layout wasn't well received by users. They had an older app where the layout was well liked and there wasn't any real need to redesign this screen / page or any benefit to doing so. We're only rebuilding this as we've moved to a Dataverse platform and the developer resources we had are no longer available to us.

BlessedCobba
Responsive Resident
Responsive Resident

Hi @Serviced2000 
the gallery layout is highly customizable, there is little to nothing you can't do in a gallery layout?
If you want to share your layout maybe could make suggestions on how to modify the gallery to suit

gallery similar to the image you posted in initial post 

BlessedCobba_0-1658799631865.png

 

Serviced2000
Helper IV
Helper IV

Sure, so this is what we are trying to achieve - the form is bigger than this and it's in a scrollable container to support the overall size. The coloured fields are what we want to try and get to - so imagine there is a difference between the two and we are highlighting fields ONLY when that difference exists :

 

Serviced2000_0-1658800076244.png

 

BlessedCobba
Responsive Resident
Responsive Resident

Hi @Serviced2000 

You can totally do this with galleries, my suggestion would be to run multiple galleries, use where there is a large chunk of fields and just filter the columns required. then you can just copy and paste the gallery and just update the columns for that section

BlessedCobba_0-1658801022545.png

 

Serviced2000
Helper IV
Helper IV

Thanks @BlessedCobba - are you able to show a screenshot of what your example looks like with the editor layout (showing the galleries lining up) - I'm not sure I'm grasping how you've done this?

BlessedCobba
Responsive Resident
Responsive Resident

@Serviced2000 I exported a simple page with a few galleries to play around with and take a look how its done

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (2,062)