My app has a number of columns that are populated from a dropdown (ref). Example: I have an Entitys table, with a unique Key column, and a Name column. In a form view based on another table, a dropdown is populated by the Name column; at that point itโs working perfectly. When it syncs it writes the key into the spreadsheet dropdown, instead of the name, and then in the app it shows a warning triangle.
Donโt use a Ref value.
What do I use instead. When Iโve tried Enum it doesnโt use the table after initialized. List does seem to work, or Iโm doing something wrong.
What do you mean exactly?
In my Entitys table I have a Bank column that I want to populate a dropdown from the โNameโ column in my Banks table. If I set Entitys-Bank to Enum, it adds to an Enum list in the editor any Bank names already being used in the Entitys rows. From then on any new Bank name that is added to the Banks table, no longer shows up in the dropdown. I hope that makes sense. BTW Entitys is purposely misspelled .
You need to use your expression in Suggested Values property of the ENUM column and explicitly mark Allow other values and Auto-complete other values properties.
Thanks, so far it works great.
Youโre welcome.
Opps, I came across a problem. Because it is explicitly set to allow other values, when I added an the value it shows in the current form, but it does add the value to the source table.
Sorry @Jerry_Hill, couldnโt understand the problem. Can you elaborate?
Yes, I have a JLedger table. I want the column โBankโ to have a drop down (DD) from which a bank is selected. By using your suggestion to use Enum with an expression in Suggested values and explicitly setting both โAllow other valuesโ and โAuto-complete other valuesโโ to true, it provides a populated DD with the banks that are currently in the Banks table. If the user adds a value for the Bank in using the DD, it populates the Bank column in the JLedger table, but it does not add that value to the Banks table; in other words, it doesnโt add a Bank record.
To add a missing Bank record, you need to use REF. If the bank is not in that list, the user than create a new Bank record by selecting New from the dropdown.
This started when I had a problem using Ref and Steven Coile told me not to use ref, and I asked what I should use instead, and you told me Enum. Here is what I asked Steve:
My app has a number of columns that are populated from a dropdown (ref). Example: I have an Entitys table, with a unique Key column, and a Name column. In a form view based on another table, a dropdown is populated by the Name column; at that point itโs working perfectly. When it syncs it writes the key into the spreadsheet dropdown, and then in the app it shows a warning triangle.
@Jerry_Hill
A ref type column displays the column value from the table set as the Label, however when itโs recorded to the back-end gSheet, it records the key column value of the referenced table. Provided you notice a yellow triangle next to the ref column in the app, this warning indicates that the key column value of the referenced record does not match with the value in the back-end gSheet.
Possible Solutions
1.) Provided you have set any initial value expression with a non-matching content to the RDBMS context, please remove away that expression.
2.) Provided you are using a Valid_If expression for the ref column, please pay attention to 2 things:
2.1.) Expression is populating the key column values of the referenced table
2.2.) The Key column and the Label column for the referenced table is properly set
Thanks millions Levent for that very thorough explanation. Being new Iโm not completely certain of the last statement, i.e., 2.2.) The Key column and the Label column for the referenced table is properly set.
Does that mean I should explicitly set the column I want displayed to be a LABEL column? And/or do they need to be side-by-side in the back-end gSheet?
I have two additional questions thatโs a little bit off topic, but for me they are related.
Does AppSheet expect the tables in the back-end gSheet to remain in the same order, or does it use the name of the tables, i.e. getSheetByName()?
Does AppSheet somehow suppress the GAS (Google App Script) code from triggering during sync?
You can choose whatever column you want to be the label column. This columnโs value will be displayed in a REF dropdown.
Great, thanks for that. Iโll leave you alone for a bit, while I digest all of the tips and tricks.
Youโre welcome
User | Count |
---|---|
36 | |
32 | |
30 | |
18 | |
16 |