Hi Appsheet, Would it be possible to make to...

Hi Appsheet,

Would it be possible to make to Valid_If rules?

I would use one to make depended dropdowns or column restrictions. A second one would be handy to use orderby () for exampleโ€ฆ

Greetings, Bram

0 7 374
7 REPLIES 7

tony1
New Member

Hi @Diogenes_ASBL_VZW. I donโ€™t understand your question, can you say more and/or give an example?

Hi Tony,

Thx for your replay. Eg:

Dependend dropdown: Column [country] with enumlist valid if = eu coutries[countries] Column [city] with reflist valid if = eu countries[cities] So appsheet will recognise the dependency of both columns.

Now I also want to use the valid if rule to give an order Orderby() or maybe a restriction: eg: [city] is only valid when the user gave his name: valid if= isnottblank[username]

You see what i mean with the combination?

tony1
New Member

@Diogenes_ASBL_VZW The โ€œdependent dropdownโ€ behavior is really just a slightly complex formula that AppSheet inserts into your valid_if for you. If you want to combine it with something else, youโ€™ll need to explicitly write out the dependent dropdown formula and combine it with AND or insert an ORDERBY.

This page gives an example of the dependent dropdown formula: help.appsheet.com - Dependent Dropdown

โ€œStrictly for an expression afficionado, here is the full underlying AppSheet expression: IN( [_THIS], SELECT(Regions[Country], [_THISROW].[Lead Region] = [Region]))โ€

Youโ€™ll need to write something like:

AND(ISNOTBLANK([Email column]), dependent formula goes here) Dependent Dropdown help.appsheet.com

Ok thx a lot @tony

Combined with orderby can the formula be something like: Orderby(dependent formula,[ordercolumn])?

Hi @tony,

I tried this formula to order my dependent column: =ORDERBY( List Lieux[Lieu], IN([_THIS],SELECT(List Lieux[Lieu],[_THISROW].[Sorte Lieu]=[Sorte Lieu])),True, [Nombre Interventions],True)

In this case the list from column [Lieu] is ordered via [Nombre Interventions] But the list is not dependent anymore of the value of [Sorte Lieu]

Is there a way to combine the expression orderby with the dependent dropdown expression?

Thx a lot, Bram

I made it!! Nice โ€ฆ

Here is a formula that works to order a dependent dropdown column:

=IN([_THIS], Orderby( SELECT(List Lieux[Lieu],[_THISROW].[Sorte Lieu]=[Sorte Lieu]), [Nombre Interventions],True, [Lieu],False ))

Cool โ€ฆ

@tony

The extended version: a dependent dropdown column that is orderd by its number of selections [Nombre Interventions] by the user and with the restriction that the user selected the button โ€œAvec la personneโ€ โ€ฆ works perfect!

=IN([_THIS], Orderby( SELECT(List Lieux[Lieu], AND([_THISROW].[Sorte Lieu]=[Sorte Lieu], Contains([Choix], โ€œAvec la personneโ€))), [Nombre Interventions],True, [Lieu],False ) ) Translate

Top Labels in this Space