In my gallery I have circle icon which changes colour depending on another field in my gallery (Membership_End) for whatever reason this icon works perfectly fine on my PC, but when I switch to the mobile device which I hope to run the app on (Samsung
Galaxy tab A 2018), the icon just isn't there. Any help would be greatly appreciated, thanks.
Additional info: My datasource is a Cosmos Database that gets saved to a collection which is then used to populate the gallery.
Formula in icon (probably not the best but it works)
If(
Value(ThisItem.Membership_End) = 0,
RGBA(
0,0,0,0
),
DateValue(ThisItem.Membership_End) < Today(),
Color.Red,
DateDiff(
Today(),
ThisItem.Membership_End
) >= 1 && DateDiff(
Today(),
ThisItem.Membership_End
) <= 14,
Color.Orange,
RGBA(
0,0,0,0
)
)
Icons on PC
Mobile View
I believe the problem was because of the way my tablet interpreted the date. The formula below appears to work on both browser and mobile app. Yet again, this probably isn't the most efficient solution, but it works.
If(
Value(
DateValue(
ThisItem.Membership_End,
"fr"
)
) < Value(Today()),
Red,
DateDiff(
Value(Today()),
Value(
DateValue(
ThisItem.Membership_End,
"fr"
)
)
) >= 1 && DateDiff(
Value(Today()),
Value(
DateValue(
ThisItem.Membership_End,
"fr"
)
)
) <= 14,
Orange,
RGBA(0,0,0,0
)
)
@PowerRanger Thanks for the help, that hasn't fully solved the problem but it's definitely pointed me in the right direction.
@MathewM could be
- DateValue, TimeValue, and DateTimeValue functions in Power Apps - Power Apps | Microsoft Docs
Try with applying a "fixed" Language to DateValue function. e.g."de"
@PowerRanger No, I have definitely published the app. Maybe it has something to do with the way the tablet interprets the date which breaks the formula?
@MathewM Have you just recently added the icons and did not publish the app?
@PowerRanger Just tested and it doesn't show the icon either.
@MathewM Have you tried to run the app in the browser on the mobile device?
@MathewM Do you run the app using PowerApps App or within the Browser?
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473