Hi there!
Iยดm having trouble with an expression that was working perfect.
Expression: IF(AND([Preg21]=โSโ,[Preg22]=โSโ],[Preg23]=โSโ,[Preg24]=โSโ,[Preg25]=โSโ),โMes completoโ," ")
The condition stops working.
In what way has it stopped working? Is there an error?
Be aware, too, of some non-intuitive behavior of the is-equal-to operator: if the value on the left side is blank, the exression is TRUE regardless of the value on the right side. For instance, if [Preg21]
is blank, [Preg21]="S"
is TRUE.
This has never made sense to me; in my mind the value of โSโ is different than โโ or even null! If you donโt include an isnotblank() in there it doesnโt work that way, and like Steve said: a blank [Preg23] will result in true just as if it had ACTUALLY met the criteria.
No sense to me.
Wait, is this true? I use these all the time and they seem to be behaving as I intuitedโฆ
Indeed.
if you had this scenario:
[Preg23] = blank
that would result in true in your formula
Itโs true. Also not intuitive, the opposite isnโt true: "S"=[Preg21]
is FALSE if [Preg21]
is blank.
THIS is nice to know. Now I"m going on a formula hunting mission in all my active apps to switch things around.
Thanks @Steve!!!
Confirm first. Itโs been a long time since I figured it all out. I may be misrembering.
Indeed, if you put an absolute value (or at least something that will never be blank) in the first position, then you can skip having to include an ISNOTBLANK() clause.
I have around 40 actions and reports that use this specifically, and now I learn it does the opposite of what it doesโฆ
I have conditions where I use โif([answer]=โyesโโฆโ where were [answer] blank, Iโm expecting โfalseโ to be returnedโฆ
I need a walk.
You are not alone. If there was one thing I could fix, this would be it.
Hey @Steve @Dengue_Evaluation @MultiTech_Visions
The ] was creating the error, also in Appsheet editor no error where shown.
I sopused it should show the error in the editorโฆ?
Regarding of all what is in this chain of comments, I agree in what Steve said, but me be it will depend on the result that we are trying to fetch with the formula?
What I looking for is that If all the conditions are โSโ is true, thatยดs it. If one doesnยดt mutch โSโ is False, and also if any of the are blanck, is also False.
Iยดm I correct?
The expression syntax is somewhat loose. In this case, I suspect the parser saw "S"]
as if it were "S]"
. There was no open bracket, so itโs not expecting a close bracket, so treats it as arbitrary literal text.
Note that quotes are not strictly required around literal text values except to differentiate literals from reserved words and syntactic elements. But since thereโs no good reference of such special elements, and itโs really too much to expect the average app creator to be aware of such things, itโs safest to quote all literal text as a matter of practice.
Try:
IF(
("SSSSS" = ([Preg21] & [Preg22] & [Preg23] & [Preg24] & [Preg25])),
"Mes completo",
" "
)
This is really clever.
This is really clever!
If I had orher vales for each column, should work right ?
Eg: If(โSFT12โฆโ=[a]&[b]&โฆ)),โxxโ,โโzzโ)
The idea behind @Steveโs formula is to essentially concatenate together all the column values and compare that to a pattern that should match.
So as long as you know the pattern of values you want, then yeah it will work with anything.
What happens if you switch things around??? In an equality operation like this it shouldnโt matter which is first (in regards to math)โฆ so if you switch it to:
โSโ = [Preg23]
would that get around it @Steve
Estas seguro que no serรก que en:
IF(AND([Preg21]=โSโ,[Preg22]=โSโ],[Preg23]=โSโ,[Preg24]=โSโ,[Preg25]=โSโ),โMes completoโ," ")
En [Preg22]=โSโ], hay un corchete de mรกs,
In the above mentioned condition theres an extra โ]โ in the formula
User | Count |
---|---|
42 | |
25 | |
25 | |
16 | |
11 |