Fixing Yellow Exclamation points for Enum/Refs

Steven_Pow
Participant I

Hello!

I am working on an application with multiple dropdowns that are pulled from a large table, with different items pulled from different sections of the table via a slice.

For instance, I have a state dropdown. The table I am pulling from has a rows like this:
ID | CATEGORY | KEY| VALUE (this row is the header)
|<General | State | Alabama>|General|State|Alabama|
|<General | State | Alaska>|General|State|Alaska|

Where the ID column is the key, as those will be unique

So, I create a slice, called GeneralState. It chooses from this table as the Source Table, and the row filter condition is: AND([CATEGORY] = โ€œGeneralโ€,[KEY] = โ€œStateโ€). I choose all columns, make it read only.

In my table, I make column type Enum, base type Ref, set the Referenced Table Name to GeneralState, set Data Validity Valid If: GeneralStates[VALUE]

When I see the preview of the app, there are yellow exclamation points, however: 2X_a_a5287bc6472022ed86c32b309351470e48748575.jpeg

Any idea what this is, and how to fix it? Thank you!

Solved Solved
0 11 2,950
1 ACCEPTED SOLUTION

This should be:

GeneralStates[ID]

A ref type column holds key-column values, though if you have [Value] set as the label-column, then youโ€™ll still see the state name in the app.

View solution in original post

11 REPLIES 11

Steve
Participant V

The yellow exclamation mark typically means the column is of type Ref, but the column value does not match a key column value in the source table of the Ref column.

Steven_Pow
Participant I

Umm, given what I am trying to do, Iโ€™m not really sure how I could fix that. Is there another Base Type I should be using other than Ref for my use case?

This should be:

GeneralStates[ID]

A ref type column holds key-column values, though if you have [Value] set as the label-column, then youโ€™ll still see the state name in the app.

@Marc_Dillon When you do this, will the Key be store in the data source or the Value?

I have an enumList and it properly displays the TYPE in the dropdown box but stores the TYPE instead of the TYPE_NO in the data source. Shouldnโ€™t you want the primary key (TYPE_NO) stored for consistency? If the TYPE changes then the link is broken if that is what is being stored.

Steven_Pow
Participant I

Actually- that works perfectly! After making the change, I have to go through and manually reselect the entries to correct them (so it can point to the key), but thatโ€™s wonderful! Thank you!

Iโ€™m assuming you mean TYPE instead of TYPE_NAME? I donโ€™t see any TYPE_NAME in your screenshots.

Judging by your screenshots, Iโ€™d have no idea why or how you are getting TYPE/NAME in the dropdown instead of TYPE_NO.

The โ€œBase typeโ€ of your EnumList is set to Text. It should be set to Ref to apply to this situation.

You can actually store ANY value in a Ref-type column, but as Steven was seeing, if that value doesnโ€™t correspond to the key value of any row in the referenced table, youโ€™ll get a yellow exclamation mark. Ref-type columns should always store the key-column values.

Edit: Also, donโ€™t really know what youโ€™re trying to do here?
2X_5_5aeb36d72cb6f737bd8565210ebc2d66010ec2af.png

You are correct, I should have written TYPE. I fixed that in my post above. I want to be able to select one or more TYPEs - that is why I used an ENUMLIST. โ€ฆ WOW. I never realized BASE TYPE existed. Thanks. I got it to work.

Thanks to both @Marc_Dillon and @Steve

Excellent.

You still have this here:

This is a plain text field, not somewhere you can put an expression. I donโ€™t think this is doing anything for you, is it?

If I delete that then I get the following error:

What should I use?

Thatโ€™s just a warning, not an error. You can safely ignore it in this case, or at least I do. Since youโ€™re already creating the list of choices with the valid_if expression.

Good to know. I really appreciate your help.

Top Labels in this Space