Expression evaluates as blank when it is not....

expressions
(Michael) #1

Expression evaluates as blank when it is not…

I am using the following expression as a Show_If constraint. The field should only be shown if another field is blank. The expression, =ISBLANK([_THISROW].[StructurePhoto]) returns TRUE when in fact the field [StructurePhoto] is not blank. [_THISROW] is set as an enum filed and [StructurePhoto] is set as an image type field.

I am using a similar expression within another table to determine which field to show the user. Here, the expression returns the correct results. =IF(ISBLANK([StructurePhoto]),[StructureSketch],[StructurePhoto])

I am at a loss as to why one filed the correct results are returned and the other not. Is this a bug?..

#2

Hi @Michael it looks like it is checking the [StructureID] column which is blank. What happens if you use just the [Structure Photo] or TableName[Structure Photo], you need to change your expression so it is checking the [Structure Photo] column.

(Michael) #3

@Lynn Hello Lynn. You are correct, omitting [_THISROW] does in fact resolve the issue I was experiencing. Omitting [_THISROW] yet the correct field is identified, tells me [_THISROW] has no value? AppSheet will look to the referenced row by default, correct?

My question now is, what’s the point of using [_THISROW] if the field referred to [StructurePhoto] is ignored?

Thank you for your help Lynn.

(Levent KULAÇOĞLU) #4

@Michael

[THISROW] expression is a shortcut to [KeyColumn].[LookupColumn] de-ref expression actually. As a column cannot reference/de-reference itself, use of [THISROW] in a Show-if formula will not work as a logic.