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:
Any idea what this is, and how to fix it? Thank you!
Solved! Go to 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.
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.
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.
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?
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.
User | Count |
---|---|
42 | |
30 | |
25 | |
23 | |
13 |