cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Concat displays different format in gallery than in label

Hello, 


I have an app that collect entries from four different categories. 
When they are reporting their work it is shown in a label on the screen using a bit of Concat: 

 

ErikParmlind_1-1596616610708.png

 

 

Concat(Sort(Distinct(Filter(DailyPlanning; Vecka= NumWeek; VeckoDag = DisplayDay.Day; Block= Label2.Text);Område);Result;Ascending) ; Concatenate(Result;" - " ;Char(10);Concat(Filter(DailyPlanning; Vecka= NumWeek; VeckoDag = DisplayDay.Day; Block= Label2.Text; Område=Result);Concatenate(Beskrivning; Char(10)));Char(10)))

But when I try to use the same code but place it within a Gallery so that I could show all records on a single page, the formatting is not being displayed. 

 

ErikParmlind_2-1596616772174.png

 

Below I think I have found a method that works using HTML text, by passing in <br> instead of Char(10) I can get the correct formatting. 

Can anyone explain why the formatting is lost? 

 

Thank you,

 

Erik 

 

 

 

 

4 REPLIES 4
mdevaney
Super User
Super User

@Anonymous 
The formatting is lost because a label can only show text in 1 format.  Your gallery has 3 labels with 3 different formats.  But your 'Concat' label is only 1 label and therefore can only have 1 format.

 

---
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."

Anonymous
Not applicable

@mdevaney 

I understand that a label can have only one size, color and if I want to show more that I need to use the HTML Text box instead. 

 

But I wonder why the label is not displaying the line feed characters and spacing that I have defined in the Concat? 
When it is not in a gallery, it seems to display correctly. When in a gallery, it works for the first column, but seems to break for the other "columns" of my horizontal gallery. 

 

Thank you, 

 

Erik 

@Anonymous 

Share your code please.

Anonymous
Not applicable

Okay. I have a screen1 where the users report the work they are planning. 

 

ErikParmlind_0-1596632265877.png

 

The black box is a text input, but I am not allowing the user to change anything. Simply using it to display the data. 


When I check "screen 2" I see that if I change to using a TextInput field it displays my data the way I expect:

ErikParmlind_1-1596632569448.png

 

So TextInput works. 
HTML works. 

But why is there different formatting for a Label? 

This is a gallery with Items property: ["Special";"Berg";"Mark";"Betong"]

There is one label displaying the name of the column

 

ErikParmlind_3-1596632855912.png

Then a label with the following code: 

Concat(Sort(Distinct(Filter(DailyPlanning; Vecka= NumWeek; VeckoDag = SelectedDay; Block= Label2.Text);Område);Result;Ascending) ; Concatenate(Result;" - " ;Char(10);Concat(Filter(DailyPlanning; Vecka= NumWeek; VeckoDag = SelectedDay; Block= Label2.Text; Område=Result);Concatenate(Beskrivning; Char(10)));Char(10)))

 

The Concat/Concatenate filters the data source by header rows and then writes out values in rows below. 
It seems to work fine for the first column. But not for any of the others? 

 

Thank you. 

 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (3,939)