Hello,
I have a very simple problem that somehow got me stuck! So I have this PowerApps user interface for corporate training with a box that shows the session time and whether it is available or full using a basic nested if-else. The code is as follows:
Text(
ThisItem.'Start Time',
"[$-en-US]ddd, mmm d, yyyy at hh:mm AM/PM CEST"
) & Text(
"
"
) & If(
ThisItem.Title = "Pitch Coaching - Basics",
If(
CountRows(ThisItem.Attendees) >= 2,
Text("Session is FULL"),
Text("Session is available")
),
Text("Session is available")
)
So, if the session name is "Pitch Coaching - Basics" and it has 2 or more participants, it shows as "Session is FULL".
I want the word "FULL" to be red and bold --> Session is FULL
It is a very basic problem, I know, and I even found some solutions online, but none of them seemed to work!!
I've tried the HTML code provided by @ZabiBabar in this post but it did not work.
I've tried the switch-if solution provided by @EricLott in this post but I think I did not implement it correctly.
I've also tried to follow the basic syntax TEXT(value, text_format, language) but it did not work either.
Please help.
Solved! Go to Solution.
Hi @beshr1993
If you want this in one control, you need HTML, however if you want a low-tech solution - two labels - left one
Text(
ThisItem.'Start Time',
"[$-en-US]ddd, mmm d, yyyy at hh:mm AM/PM CEST"
) & Text(
"
"
) &
"This Session is "
right one
If(
ThisItem.Title = "Pitch Coaching - Basics",
If(
CountRows(ThisItem.Attendees) >= 2,
"FULL",
"available"
),
"available")
)
Colour
If(Self.Text="FULL",Red,Black)
FontWeight
If(Self.Text="FULL",Bold,Normal)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @beshr1993
If you want this in one control, you need HTML, however if you want a low-tech solution - two labels - left one
Text(
ThisItem.'Start Time',
"[$-en-US]ddd, mmm d, yyyy at hh:mm AM/PM CEST"
) & Text(
"
"
) &
"This Session is "
right one
If(
ThisItem.Title = "Pitch Coaching - Basics",
If(
CountRows(ThisItem.Attendees) >= 2,
"FULL",
"available"
),
"available")
)
Colour
If(Self.Text="FULL",Red,Black)
FontWeight
If(Self.Text="FULL",Bold,Normal)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Got it. Thanks a lot 🙂
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
212 | |
194 | |
82 | |
59 | |
38 |
User | Count |
---|---|
305 | |
255 | |
119 | |
86 | |
55 |