How to use OR function with if conditions

Hi , why appsheet can’t read this formula , is there something wrong ???
OR
(
if([categorie1]=Optique,“Monture”,""),
if([categorie1]=Solaire,“Monture”,"")
)

You’re using OR() wrong.

See also:

1 Like

I read that topic ,I can do simple formulas , but now am trying to apply it with an IF function more complicated which is not explained in the topic .But I unfortunately I get always an error I want to find it out

ORs return a true/false(yes/no). Your if formulas return text values. I think what you want is IF(OR(…), Monture,"") or you could use an IFS().

3 Likes

I want a formula which will return text values “Monture” in two cases :
if([categorie1]=Optique,“Monture”,"") OR if([categorie1]=Solaire,“Monture”,"")

Hi @Soufiane_M

Something like that ?

IF(
OR([categorie1]="Solaire",
   [categorie1]="Optique"),
"Monture",
"")
3 Likes

GREAT , that’s the solution for my question it works when only one returnes Thank youu , but now what if I multiple returnes for exemple :
if [categorie1]=“optique” retunes “monture”
or
if [categorie1]=“Solaire” retunes “solaire”

??

2 Likes

Please have a look to the article about “SWITCH” :wink:

3 Likes

Great hopefully I find this tutorial on Youtube explain well the SWITCH FUNCTION AppSheet SWITCH() Expression - YouTube Thank you very much guys

1 Like