Hello, I have a customer table, an installation table, with several installations per client. My sav form asks me for the client name and I want the following field to be an enumlist of the installations in reference to the client Is it possible ? how?
Thank you
Thank you
@Remi_Garson Use a valid_if to create a dropdown help.appsheet.com - Dropdown from Valid_If Dropdown from Valid_If help.appsheet.com
I forgot to specify the entry name refers to a table and the entry instalation refers to another table see the attached drawing table sav
wow !! it works ! thank you for your help, and for getting me by myself! I understood new things today.
@tony sorry again a little trouble, I was expecting to have a line here:
and I have an exclamation point here
The exclamation point means the reference is invalid. The values of a ref column should be key values from the referenced table. Your other problem is probably another manifestation of having an invalid ref value.
So I create a virtual column ref that should send me the key of the installation table according to the previous 2 conditions: = SELECT (installation [installation ID], and ([name] = [_ THISROW]. [Client], [type] = [_ THISROW]. [Type]))
this formula returns a list and is therefore not compatible with a Ref column whereas a single value can be returned in principle
@Remi_Garson If you know that only a single value will match, you can wrap your select expression in ANY:
ANY(SELECT(โฆ))
@Remi_Garson You might also be interested in the LOOKUP function, which is just shorthand for ANY(SELECT(โฆ)).
appsheet.com - Lookup Function - How to use the LOOKUP function Lookup Function - How to use the LOOKUP function appsheet.com
It works but this formula does not work with a ref column, I worked around the problem with a column text [test] then a column ref [test suite] = [test] Is there another best method?
@Remi_Garson Can you change your essai column to be a Ref pointing to the correct table?
Thank you, it works! I had to make a mistake when assigning the table
@Remi_Garson The usual way to have an EnumList populated by values from another table is with a valid_if. Can you explain why that wonโt work in your case?
it will also work with a real column instead of the virtual What is the preferred method?
@Remi_Garson It will work either way. Virtual columnsโ formulas are always recomputed. Non-virtual columnsโ formulas are only computed when the row itself changes and are written to your sheet. Thereโs no preferred method, since it all depends on your needs.
@tony ok, Iโll think about it thanks for the help provided
@Remi_Garson Your formula is not using the correct syntax. Please look at the third example in the article that I linked to.
@tony , I tried with this formula: Select(installation[type dโinstallation], installation[nom]=entretien[nom])
no error in the app but no results in the drop-down menu do I still forget something?
@Remi_Garson Your syntax is still wrong. โinstallation[nom]โ means โthe entire list of values from the nom column of the installation tableโ. You probably want something like this instead (you may have to play with it):
[nom] = [_THISROW].[nom]
how does appsheet make the difference because i have 2 column name in 2 different table?
@Remi_Garson Letโs say you have a table called Companies and you put a formula like this into one of the Companies tableโs columns:
SELECT(Customer[Name], [Company Name] = [_THISROW].[Company Name])
User | Count |
---|---|
43 | |
26 | |
24 | |
14 | |
12 |