SOLVED

Invalid use of " . "

Occasional Contributor

When i try to insert an if statement

if(ThisItem.Status.Value = "APPROVED", true, false)  for an Icon Visibility it is not working and This.Item.Status.Value is underline in red with an error with invalid use of " . "

 

Any clue ?

6 Replies
1.Is you icon within the gallery or outside it, as thisitem only works within gallery
2. What kind of field is Status?
best response confirmed by AndyPeper (Occasional Contributor)
Solution
Thx @Nicolas for helping:) 1. Icon is within Gallery 2 Field is from a Sharepoint list as a Choices Field (column)

@NicolasKheirallah 

Color property is working like a charm with

If(ThisItem.Status.Value = "APPROVED", Green,If(ThisItem.Status.Value = "PAID", Orange, Black))

but Visible property don't with

If(ThisItem.Status.Value = "APPROVED", true, false)

Thx @NicolasKheirallah for helping:) 1. Icon is within Gallery 2 Field is from a Sharepoint list as a Choices Field (column)
In the end that formula works now by recreating in by make sure it is in the gallery at first thx to @NicolasKheirallah
Great job! :)