I have a gallery of employees on the Start Screen of my app, and I need the fill to show either green or red, depending on if a record has been entered with their name on it already for that current month. This is what I have tried thus far and have not been able to get to work (the solid line is used to denote the end of one failed formula and the start of a new formula, as I have tried multiple things):
If(
CountRows(
Filter(
'SharePointListName',
ThisItem.displayName = 'Name',
Month(DataCardValue4.SelectedDate) = Month(Now())
) > 0
),
RGBA(111,255,0,.35),
RGBA(255,0,0,.35)
)
________________________________________
With(
{
wList:
LookUp(
'SharePointListName',
ThisItem.displayName = 'Name'
)
},
If(
!IsBlank(
LookUp(
wList,
Month(DataCardValue4.SelectedDate) = Month(Now())
)
),
RGBA(255,0,0,.35),
RGBA(111,255,0,.35)
)
)
The first solution was something I tried to do on my own, but that didn't work. As a note, there is a date column 'Completed Date', but when I tried to enter that into the Month() function, it said it was invalid.
The second was a solution that I had found via Google, but I could not get it to work for me. I wasn't sure what wList was - my guess was that was creating a variable/name for the list being created with the With function (first argument, identifying the scope).
Is what I'm asking even possible?
P.S. - Please forgive my formula formatting - I did the best I could.