acondition in valid_if

I Want to Have condition in the in the field[Square] valid_if to check if the Field [Province]="Salalah" then do dependent dropdown list else show the field[Square] to the user for data entry

I have tried to use IFS() but not of my tries worked

First attempt
IFS(
[Province]="Salalah",Cities[Square],
AND([Province] <>"Salalah", [Square]="")
)

 

Second try
IFS(
[Province]= "Salalah",Cities[Square],
[Province]<>"Salalah", [Square]="",
)

Solved Solved
0 6 114
1 ACCEPTED SOLUTION

If you'd like to sort the list of provinces, set the Valid If for Province of the Properties table to:

SORT(
  SELECT(
    Cities[Province],
    TRUE,
    TRUE
  )
)

Similarly, for State:

SORT(
  SELECT(
    Cities[State],
    ([_THISROW].[Province] = [Province]),
    TRUE
  )
)

 And for Village:

SORT(
  SELECT(
    Cities[Village],
    AND(
      ([_THISROW].[Province] = [Province]),
      ([_THISROW].[State] = [State])
    ),
    TRUE
  )
)

For Square, use Suggested values instead of Valid If:

SORT(
  SELECT(
    Cities[Square],
    AND(
      ([_THISROW].[Province] = [Province]),
      ([_THISROW].[State] = [State]),
      ([_THISROW].[Village] = [Village])
    ),
    TRUE
  )
  - LIST("")
)

View solution in original post

6 REPLIES 6

IFS(
Province]<>"Salalah",[Square],
Province]="Salalah",Cities[Square]
)

Error

Column Name 'Square' in Schema 'Properties_Schema' of Column Type 'Text' has an invalid data validation constraint '=IFS( Province]<>"Salalah",[Square], Province]="Salalah",Cities[Square] )'.

Steve
Platinum 4
Platinum 4

You cannot mix dependent dropdowns with other conditions. Since you have another condition, you will need to implement the dependent dropdown behavior for this column yourself.

Please provide the Valid If expressions of all columns involved in the dependent dropdown.

I have two tables as shown below
In DATA of the Table [ Properties] i need to do dependent dropdown in Valid_if  in Following  Fileds

Cities[Province]

Cities[State]

Cities[Village] I need to order the Villages from (A-Z)

Cities[Square] IF Cities[Square] is not blank for that Village than do a dependent dropdown list of Cities[Square] else allow the user the enter date the Square Field 

 

[Cities]

IDProvinceStateVillageSquare
1DhofarSalalahAdhan Valleyc
2DhofarSalalahBrisut Industrial ZoneB
3DhofarSalalahAwqad SouthB
4DhofarSalalahAwqad Al SharqiahB
5DhofarSalalahAdhan ValleyB
6DhofarSalalahBrisut Industrial Zonea
7DhofarSalalahambia
8DhofarSalalahAl Shati neighborhooda
9DhofarSalalahAwqad Southa
10DhofarSalalahAwqad Al Sharqiaha
11DhofarSalalahAwqad Westerna
12DhofarSalalahAwqad Al Wustaa
13DhofarSalalahAin Arzata
14DhofarSalalahAin Jerzeeza
15DhofarSalalahAin Hamrana
16DhofarSalalahAin Sehnouta
17DhofarSalalahAdhan Valleya
18DhofarSalalahAtheno 
19DhofarSalalahasnot 
20DhofarSalalahAiboot 1 
21DhofarSalalahAiboot 2 
22DhofarSalalahAdoration 
23BuraimiBuraimiAbu Nakhila 
24BuraimiBuraimiAl Ghurayfa 
25BuraimiBuraimiacceptor 
26BuraimiBuraimiAgran valley 
27BuraimiAl-Sanainablack 
28BuraimiAl-SanainaBuhaisah 
29BuraimiAl-SanainaAl-Sanaina 
30BuraimiAl-SanainaAl Ghubaira 
31BuraimiAl-Sanainacheek 
32BuraimiAl-SanainaAin El Helweh 

[ Properties]

IDUser_emailUser_nameTo advertiseDateProvinceStateVillageSquarePlot noproperty typeAreaTotal income Rent valueDetailsPriceOmanReal LinkGoogle LinkProperty Photo
                   

 

If you'd like to sort the list of provinces, set the Valid If for Province of the Properties table to:

SORT(
  SELECT(
    Cities[Province],
    TRUE,
    TRUE
  )
)

Similarly, for State:

SORT(
  SELECT(
    Cities[State],
    ([_THISROW].[Province] = [Province]),
    TRUE
  )
)

 And for Village:

SORT(
  SELECT(
    Cities[Village],
    AND(
      ([_THISROW].[Province] = [Province]),
      ([_THISROW].[State] = [State])
    ),
    TRUE
  )
)

For Square, use Suggested values instead of Valid If:

SORT(
  SELECT(
    Cities[Square],
    AND(
      ([_THISROW].[Province] = [Province]),
      ([_THISROW].[State] = [State]),
      ([_THISROW].[Village] = [Village])
    ),
    TRUE
  )
  - LIST("")
)


Thanks You are the best 👍

I hope that there is an  option to sort data as a check mark within the program 
For people like me who are not good at coding

Top Labels in this Space