cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Henry1290
Frequent Visitor

Power app label color depending on the user

Hi,

I am trying build chat-like screen in powerapp, which contains of form with text input where user enter message (connected to SP list), Send button and Gallery with labels that displays sent messages (so to look like a messenger)

I would like to distinguish these labels with colors depending on user. 

For example for user who sends message label will be green and for received messages label will be yellow.

Are there any ways to do so?

 

Thanks in advance for answers!

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @Henry1290 ,

 

You could use Created By column .

vxiaochenmsft_0-1636081413466.png

vxiaochenmsft_1-1636081427768.png

If(ThisItem.'Created By'.Email=User().Email,Green,Yellow)

 

Best Regards,

Wearsky

 

 

View solution in original post

2 REPLIES 2
AmeerJab
Resolver I
Resolver I

Hello,

how do you differentiate between a sender and a receiver, if you have this information then use it in an If statement

 

Ex.. If( sender , RGBA(green values), RGBA (yellow values))

hope this help,

regards.

v-xiaochen-msft
Community Support
Community Support

Hi @Henry1290 ,

 

You could use Created By column .

vxiaochenmsft_0-1636081413466.png

vxiaochenmsft_1-1636081427768.png

If(ThisItem.'Created By'.Email=User().Email,Green,Yellow)

 

Best Regards,

Wearsky

 

 

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (4,178)