View selection formula not working correctly

Hi all,

I have a view that’s supposed to show documents based on the following criteria.

Form = “SR”;

field1 = “A”:“B”:“C”;

field2 = “X”:“Y”;

field3 = “d”:“e” and approveflag = “approved”.

These fields have other values in them too. example - field1 has “O”:“P” field2 has other values etc… All the fields are editable dialoglist and has “Allow multiple values” selected.

My selection formula is as follows:

Valselect := @If(Field1 = “A”:“B”:“C” | Field2 = “X”:“Y” | Field3 = “d”:“e”; “True”; “False”);

Valnotselect := @If(Field1 = “O”:“P” | Field2 = “Q”:“R”;“True”;“False”);

SELECT form = “SR” & approveFlag = “Approved” & Valselect = “True” & valnotselect = “False” & (field1:field2:field3) != “”

The first column in the view is categorized in an ascending order and has

the following formula @Trim(field1:field2:field3).

EXAMPLE OF PROBLEM: If a document in the db. is created using the form “SR” and if it has values x, y and q selected for field1, in my view, I want only the categories “X” and “Y” to show up in the first column, and not the “Q” category. However, that’s exactly what’s happening, I am seeing all 3 categories X, Y and Q (with a twistie) and the document is under them.

How do I filter the “Q” category out and just show the document both under category “X” and “Y”?

I have to filter out the values similarly for the other 2 fields too.

Any help is greatly appreciated.

Thank you,

Archana Mulay

Subject: View selection formula not working correctly.

You cannot really do this in Notes, as far as I know.

If the document has a value of X, Y and Q in the field, then it will appear under each of these 3 category when you categorize the view.

You can of course remove the Q value from the column by using a replace substring, and a trim, but that will remove ALL Q values. You cannot selectively show cerain documents under certain categories and certain other under other categories based on a categorized multi-value field.

At this point the selection becomes dynmaic and the only way to do this in Notes, is to export the view and process it into an excel sheet, or into a CSV export, or into a formatted HTML report, or any otehr way which involves not havign a Notes view anymore…

hth

Nicolas Abesdris

Subject: View selection formula not working correctly.

I think I got it to work. In my catergorized column, I added the following:

@trim(“A”:“B”:X":Y":D":“E”)

Archana Mulay

Subject: View selection formula not working correctly.

If you only want to see certain values from a multivalue field, try this:

Field1Exclude := @Trim(@Replace(Field1; “A”:“B”:“C”; “”));

Field1Show := @Trim(@Replace(Field1; Field1Exclude; “”));

Do this for each field, and then you will only see the values you want, with the others left out.

Subject: RE: View selection formula not working correctly.

Thank you guys, I did something along the line and it worked great.