I have a very weird issue. I use the following construct for the text property of a label:
If(LookUp(Filter('LCC Requests', StartsWith(gccDesc, varSelectedRFS)), empCountry = Label19.Text, Status.Value) = "New", "X", "Y")
This works perfectly fine. If the status of the first matching entry is "New", it returns "X", else "Y".
Now I want to use this construct to change the font color of some other control accordingly:
If(LookUp(Filter('LCC Requests', StartsWith(gccDesc, varSelectedRFS)), empCountry = Label19.Text, Status.Value) = "New", RGBA(0, 105, 117, 0.5), RGBA(0, 0, 0, 1))
While this is giving me the expected result and the font color changes as desired, there is an error:
The requested operation is invalid. Server Response: LCC Requests failed: The query is not valid.
I researched this, there are many posts about the issue, but I couldn't find one that would resolve this.
I can confirm that varSelectedRFS and Label19.Text are never null or empty (in which case the first construct would fail as well anyway). What could be causing this error, am I missing something?