Good afternoon Community,
From a table called NOTAS I refer to two other tables CONCEPTOS and TIPOCONCEPTOS, by their fields IDCONCEPTO, CONCEPTO , IDTIPOCONCEPTO, TIPO.
These tables are cascaded, that is, when I choose a CONCEPTOS,
the second field shows me only the TIPOCONCEPTOS that are related to CONCEPTOS.
It works fine but it doesn’t show me the results in alphabetical order, which is what I want.
I use this expression that I would like to change…
IN( [_THIS], SELECT(TIPOCONCEPTO[TIPO], [_THISROW].[IDCONCEPTO] = [IDCONCEPTO].[CONCEPTO]))
I have tried with:
IN( [_THIS], ORDERBY(TIPOCONCEPTO[TIPO],[TIPO],[_THISROW].[IDCONCEPTO] = [IDCONCEPTO].[CONCEPTO]),FALSE)
But I don’t get good results…
Any ideas please.
Thanks for your time.
You’re talking about a dependent dropdown situation, right?
Valid_if expression can return a yes/no, or a List value. You’re using the yes/no option, you should be using the List option if you want them sorted.
SORT( SELECT( table[col] , [col2] = [_THISROW].[col2] ) )
Also note that ORDERBY only works for key values, which I don’t think is what you’re doing.
https://help.appsheet.com/en/articles/961544-dropdown-from-valid_if
https://help.appsheet.com/en/articles/961554-dependent-dropdown
https://help.appsheet.com/en/articles/2357312-orderby
2 Likes
Thanks for your help Marc_Dillon, Finally I think I managed to solve it with this expression:
IN( [_THIS], ORDERBY(SELECT(TIPOCONCEPTO[TIPO], [_THISROW].[IDCONCEPTO] = [IDCONCEPTO].[CONCEPTO]),[TIPO]))
Best Regards
1 Like