Is there any way I can work in both LS and Command language with simple function like AND. In LS, I’m keeping track of actions by the user by setting a field equal to its value OR 1 or 2 or 4 etc and then following it by testing with AND. It’s easy to do, but then formula seems to be complicated.
Subject: yes there are equivalents
and = & or = |
not = !
Take a look at Domino Designer help, logical operators.
Subject: sorry - does not seem to be what I’m looking for
for example, in LS, field xx contains an integer value that basically is a set of binary switches (1,2,4,8,16,… and any combination). If I want to have 1,4 and 16 switched on, then xx = 21. I can say then test in LS If (xx AND 16) = 16 then … (True)
but in Command, I can’t say @If(@Ascii(xx) and 16) = 16;True;False)
Can you help further?
Subject: it would have been easier to help if you had given this much information the first time.
So to explain this correctly, you have a multivalue field, xx containing a number of values, 1,4, 16 for example.
Not sure I follow your example of having “and 16”, why have and 16 in there at all?
Anyway, in formula language you can do this pretty easily.
FIELD xx := 1:4:16;
@If(xx=16;“16 is there”;“16 isn’t there”)
If you were doing this on string values, not numbers you would use @contains
Look at Domino Designer for "Working with lists "
Subject: I did not mean a list - a single value integer
but, maybe that’s the solution - I will try to work in both LS and Formula with a multi-value field.
However, the question remains, is is possible to AND a field to get a result equivalent to what LS does.
Subject: reading what you want in the notes 6/7 forum, not it isn’t