Jul 14 2023 10:33 AM
My app uses a gallery of buttons to act as tabs and create a tabbed form. See screenshot.
Each field in the form Visible property is set to either true so it shows on all tabs or set to
varTabSelected=X so it shows only on a specific tab, where X is the ID of the button.
The back end of the app is a SharePoint list. The field is a Single Line of Text. In PA, the field name is DataCardValue14. The intention is to fill the gallery as green if the field has a value and grey if the field does not have a value. I set the Visible property to true so the field always shows and visible property is not a contributing cause in this issue.
No matter what, this code for the Gallery Fill property returns true, even if the field is blank / null:
If(Not(IsBlank([DataCardValue14]), Color.Green, Color.Gray)
If I set the value to 5, or the default to 5, and then set Gallery Fill property to:
If([DataCardValue14] = 5, Color.Green, Color.Gray)
PA shows ""Incompatible types for comparison. These types can't be compared: Table, Number."
PA does not see DataCardValue14 as a text or number. Instead, it sees DataCardValue14 as a table.
If I try to cast the DataCardValue14 as Text:
If(Not(IsBlank(Text([DataCardValue14]))), Color.Green, Color.Gray)
PA shows "Expect Text or Number. We expected a text or a number in this point of the formula."
Why does PA think this value is a table and what can be done so the formula properly evaluates to true or false?
Jul 14 2023 12:24 PM
SolutionJul 14 2023 12:24 PM
Solution