Ref literal vs. label value in chart legend

In my charts, the legend uses the literal value of the column being summarized (see following screenshot) even though the column is a reference to another table's key column. Elsewhere AppSheet automatically substitutes the referenced table's label column values for the literal values--e.g., when selecting a value for the column in a form, when using the column as a group header in a view.

In a chart view, is what I'm observing a result of something I'm doing wrong, a bug, or simply expected behavior for which I need to implement a workaround (such as adding the referenced table's label column to the table I'm charting, like is apparently necessary to Sort group headings by displayed value instead of reference ID)?

dbaum_0-1653655344131.png

 

1 6 214
  • UX
6 REPLIES 6

Steve
Platinum 4
Platinum 4

Is the Assigned to column of type Ref?

Thanks, as always, for considering my question and helping me troubleshoot. Your question helped me dig in and compile more info. I think I've identified at least inconsistent AppSheet behavior--perhaps indeed a bug.

The Assigned to column from my original post is an Enum column with a base type of Ref. Since you pointed me in that direction, I did some testing, and that's indeed a factor.

In a sandbox app, I created:

  • a Locations table with a Location ID column as key and a Location column as label
  • an Events table with 2 columns each referencing the Location ID column--1 as Enum type with Ref base type and 1 as Ref type--and each populated with identical data (via the app UI, but screenshotted here from the data source just for reference)

dbaum_4-1653690053179.png

dbaum_5-1653690149610.png

Here are identically configured charts based on each of those columns. The chart based on the Enum + Ref column shows literal values while the Ref column shows label values.

Enum + Ref column

dbaum_0-1653689299009.png

Ref column

dbaum_1-1653689329443.png

As mentioned in my original post, elsewhere in my app I've observed equivalent rather than discrepant behavior between these 2 types of column configurations. For example, when used as a group header both columns display the referenced table's label values rather than the literal key values. See the identical labels in the following screenshots (although I don't know why the group headers' font size differs depending on the column).

Enum + Ref column

dbaum_2-1653689905271.png

Ref column

dbaum_3-1653689964793.png

I no longer recall precisely why I created many of my columns as EnumRef rather than just Ref. I originally used just Ref and encountered some challenge that a post from someone here in the community (you, I believe) explained would be avoided by using EnumRef. Maybe it was a need to avoid users having access to the "New" option when selected a value for the column,  which in my testing just nowI noticed is present for the Ref column but not the EnumRef column.

Enum + Ref column

dbaum_6-1653691225821.png

Ref column

dbaum_7-1653691250989.png

Regardless, you're surely more expert than I regarding whether there are appropriate reasons to use one or the other technique. And, in any case, I'm back to my original question: Should both column types yield label rather than literal values in a chart legend, just as they do elsewhere in the app?

  • If yes, then this is apparently a bug.
  • If no, then I appreciate any guidance regarding how to avoid this confusing (at least to me) behavior. It seems that I can change the column type to Ref or add a new column to store the label in the referencing table. If there are other advisable techniques, please recommend those if you have more time to help me.

I'd call it a bug.

Thanks for confirming.

From my AppSheet account, I used the "Contact Support" option to submit the bug info, including a link to this thread. If there's a more appropriate approach for logging bugs, please advise.

I'm also hitting this bug, @dbaum, did you ever hear back about this issue with timeframes for resolution? 

Likely not. When I was active in the community, I usually updated threads like this if I learned additional information.

Top Labels in this Space