Yellow triangle warning if I don't have brackets in formula

I have three tables:

 * Grants (Which includes Name)

* Grants Deadline  (Including Grant ID as reference)

* Grants Submitted (Including Grant Deadline ID as ref)

When I view a Grants Submitted record, I want to see the Grant's name.

I have a formula like this:

[Grant Deadline Id].[Grant Id].[Name]

Which results into the yellow warning. However, the name of the grant is displayed fine.

BUT! If I change the formula to this:

([Grant Deadline Id].[Grant Id]).[Name]

The exclamation mark goes away (?!?)

Did I hit a bug?

Merc.

Solved Solved
0 3 155
1 ACCEPTED SOLUTION


@mercmobily2 wrote:

Did I hit a bug?


Possibly a bug.

But most likely neither way you have implemented your expression is correct.  The yellow warning symbol is displayed for REF type columns when a value inserted is not a valid Ref value based on either the Valid_If formula or default list.  Ref Values must, mustMUST  (did I emphasize that enough?) be row keys only from the source table.  Assigning [Name] column doesn't seem to by your row key (and shouldn't be).

The intent of a Ref column is to set a "pointer" to the desired ROW from that source table.  That's it!   It allows you to get access to any of the columns of that row.  Which you can then use in expressions or assign to ANOTHER column to display

AppSheet does have a feature to set a "Label" attribute on each table.  This determines the column used as the REPRESENTATIVE display value for that row.  

SO...in your Grants table set the [Name] column as the "Label" column.  Then simply set your problem Grant column as :

[Grant Deadline Id].[Grant Id]

Name should automatically be displayed.

I hope this helps!

Please let us know if you have any questions.

 

 

View solution in original post

3 REPLIES 3


@mercmobily2 wrote:

Did I hit a bug?


Possibly a bug.

But most likely neither way you have implemented your expression is correct.  The yellow warning symbol is displayed for REF type columns when a value inserted is not a valid Ref value based on either the Valid_If formula or default list.  Ref Values must, mustMUST  (did I emphasize that enough?) be row keys only from the source table.  Assigning [Name] column doesn't seem to by your row key (and shouldn't be).

The intent of a Ref column is to set a "pointer" to the desired ROW from that source table.  That's it!   It allows you to get access to any of the columns of that row.  Which you can then use in expressions or assign to ANOTHER column to display

AppSheet does have a feature to set a "Label" attribute on each table.  This determines the column used as the REPRESENTATIVE display value for that row.  

SO...in your Grants table set the [Name] column as the "Label" column.  Then simply set your problem Grant column as :

[Grant Deadline Id].[Grant Id]

Name should automatically be displayed.

I hope this helps!

Please let us know if you have any questions.

 

 

Point fully taken -- and in my case, this IS the perfect solution!

So... my follow up question is: what IF I wanted to display some value of the Grants table, which wasn't the label itself but some other field? I want to do so NOT to link to that particular record, but just ti display that data.

I tried turning the field into Text and link it with [Grant Deadline Id].[Grant Id].[Name] but it didn't work -- AppSheel seems to turn it back into a Ref field

Unfortunately, AppSheet doesn't have a way to just show values.   They must be in a column to be displayed in a view.  I typically add a normal column for any value I don't think will ever change.  If there is some chance the Parent value could change, I use a Virtual Column so any updates are propagated automatically.

Whichever column you choose to use, you would then assign the value using the "dot" notation like you have shown:

[Grant].[Column name to be shown]
Top Labels in this Space