Hi All!
When I try to evaluate a column condition of a collection to change the color of a circle, it doesn't work ...
Any idea how to refer to the collection?
Thanks in advance
Regards
S
Solved! Go to Solution.
PowerApps is having trouble understanding which row in the collection you want to check. I believe you want it to look at the first one. Replace DaysFinal.Item1 with the code below in both places.
First(DaysFinal).Item1
---
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."
Hi Kepda,
You're changing the color based on the collection, does this only contains 1 item?
If yes: Power Apps does not know this and will check on the whole table which he can't determine if the value is "vacation".
You can solve this by using First(DayFinal).Item1
If this is not the case, you will have to find a workaround.
Can you provide a little more detail about the app?
Kind Regards,
Kenneth Nicasens
You could solve this by doing the following:
In your collection you have the date. Based on this date you can do a lookup, problem is that you need to concatenate the date yourself.
Switch(
LookUp(
colEvents,
Concatenate(
Text(
Day(
DateAdd(
_firstDayInView,
ThisItem.Value,
Days
)
)
),
"/",
Text(Month(_firstDayOfMonth)),
"/",
Text(Year(_firstDayOfMonth))
) = Text(colDate)
).Item1,
"Vacation",
RGBA(56,96,178,0.2),
"Work",
RGBA(56,96,178,0.5 ),
"Weekend",
RGBA(56,96,178, 1),
RGBA(56,96,178,0.6 )
)
I would also do a switch instead of an If, this way you make it more Future proof.
PowerApps is having trouble understanding which row in the collection you want to check. I believe you want it to look at the first one. Replace DaysFinal.Item1 with the code below in both places.
First(DaysFinal).Item1
---
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."
Hi Kepda,
You're changing the color based on the collection, does this only contains 1 item?
If yes: Power Apps does not know this and will check on the whole table which he can't determine if the value is "vacation".
You can solve this by using First(DayFinal).Item1
If this is not the case, you will have to find a workaround.
Can you provide a little more detail about the app?
Kind Regards,
Kenneth Nicasens
the "items1" column could be vacations or work:
Yes, that's true. But you cannot simply check to see if Items1 is equal to vacations or work because there are several rows and PowerApps doesn't know which row to check.
Which row do you want to check?
---
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."
Actualy all (Item1)....maybe ForAll function could work...
Thanks to All, "First" function works!
Sorry clumsiness!!😥
Is not working...
First function just evaluate the 1st record...
I tried LookUp, Filter, ForAll, and not luck...
My brain is hanging upside down😖
User | Count |
---|---|
256 | |
106 | |
85 | |
51 | |
43 |