Good day everybody!
I made a calendar from scratch. I'm using nested gallerys to make it work. It works properly, but people would like me to make it when they adding events to a calendar , every events should have its on color. I attached an image. I would like to make it so these "Tests" appear with different colors. And some as other events.
If you need any additional information to be able to help please let me know.
Best regards,
Robin
Solved! Go to Solution.
I use a formula based on the last three char of the meeting name. But you have to set a local collection before that.
In OnStart() property of the app use:
ForAll(
Sequence(26),
Collect(alphabetCode,
{ID:Value*2,Char:Char(Value+64)},
{ID:Value*2+1,Char:Char(Value+96)}
)
)
and in your Fill property of the label to:
RGBA(
Round(LookUp(alphabetCode,Right(Self.Text,1)=Char,ID)*4,0),
Round(LookUp(alphabetCode,Mid(Self.Text,Len(Self.Text)-1,1)=Char,ID)*4,0),
Round(LookUp(alphabetCode,Mid(Self.Text,Len(Self.Text)-2,1)=Char,ID)*4,0),
1
)
It's just a silly thought 😊 !
Hope it helps !
Using Rand() and Round() functions it can be a way to achive your expectations.
In Fill property of the Label control use something like:
RGBA(Round(Rand()*255,0), Round(Rand()*255,0),Round(Rand()*255,0),1)
In this way all events in calendar will have a randomize color.
Hope it helps !
Hey, its close, I just have an other problem with it this way.
I would like to give one event the same color, so both of test 1 should be blue.
And for some reason it does not fill out the whole area. //Edit: I worked this out, only need something for the other problem
I use a formula based on the last three char of the meeting name. But you have to set a local collection before that.
In OnStart() property of the app use:
ForAll(
Sequence(26),
Collect(alphabetCode,
{ID:Value*2,Char:Char(Value+64)},
{ID:Value*2+1,Char:Char(Value+96)}
)
)
and in your Fill property of the label to:
RGBA(
Round(LookUp(alphabetCode,Right(Self.Text,1)=Char,ID)*4,0),
Round(LookUp(alphabetCode,Mid(Self.Text,Len(Self.Text)-1,1)=Char,ID)*4,0),
Round(LookUp(alphabetCode,Mid(Self.Text,Len(Self.Text)-2,1)=Char,ID)*4,0),
1
)
It's just a silly thought 😊 !
Hope it helps !
Yes its almost OK now!
How would you change this code so it takes the first three latter not the last three?
Because its seems its working just all of my title last 3 alphabet are the same, so if I could use the first three that would be very good.
RGBA(
Round(LookUp(alphabetCode,Left(Self.Text,1)=Char,ID)*4,0),
Round(LookUp(alphabetCode,Mid(Self.Text,2,1)=Char,ID)*4,0),
Round(LookUp(alphabetCode,Mid(Self.Text,3,1)=Char,ID)*4,0),
1
)
I prefer the last 3 char because the probability to be different is higher than the first 3 char ( in your example meeeting Test1 and meeting Test2 will have the same color if you use the first 3 char).
I can try different approach on this matter.
Yes you are right but that was just for testing purposes.
Other than that in the title I'm using 7 different names which are different from each other so now its working properly.
Thank you for helping , I appreciate it very much!
I have used your formula, but all entries in the title Is black. Any idea?
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.
User | Count |
---|---|
200 | |
96 | |
56 | |
51 | |
41 |
User | Count |
---|---|
264 | |
157 | |
83 | |
80 | |
56 |