View Selection problem

I have a PERSON -form and with this form I have created for each person one document per year (at the moment 3 or 4 documents/person).Now I want to go through all docs of each person (like a loop) and to pickup only those persons name (only once) who has not any documents created year is the current year.

For example: Person A has 3 docs (created 2002, 2003 and 2004, person B has 4 docs (created 2002,2003,2004 and 2005) and person C has 4 docs (created 2001,2002,2003 and 2004) → to the view the name of persons A ja C.

I think it is not possible to resolve this problem using formula language. Please does anyone have code example to give me.

Subject: View Selection problem

Hi

If you are trying to do a view, why not have a view with selection criteria

SELECT Form = “PERSON”

Have the first column being the ‘name’ field.

column 2 "@if( @Year( @Created )= “2001”; “X”; “”)

column 3 "@if( @Year( @Created ) = “2002”; “X”; “”)

column 4 "@if( @Year( @Created ) = “2003”; “X”; “”)

etc

Each column to have the property “Click on column header to sort” and titled with the year

this would give a view like

name…2001 2002 2003

andrew g…x…

andrew g…x…

bob…x…

you could just click on each column to sort by year and see who has not got a particular year.

HTH

andyG

Subject: View Selection problem

It’s very difficult to get aview with documents that not exists!

If you only want the list of people without document of that year, follow this method:

Make a view with all the people documents. The first column must be the name, sorted and categorized. Call it, “(Persons)” for example.

Make a second view copying the first one. Insert as a first column, the year field, sorted and categorized. The second column must be the name, only sorted. Call it “(PersonsByYear)”.

Create an action o link in a navigator with this formula:

all:= @trim( @unique( @dbcolumn( “”:“Nocache”; “”; “(Persons)”; 1)));

year := “2005”;

thatyear1 := @dblookup( “”:“Nocache”; “”; “(PersonsByYear)”; year; 2);

thatyear := @if( @iserror( thatyear1); “”; @trim( @unique( thatyear1)));

allwithoutyear := @trim( @replace( all; athatyear; “”));

@prompt([OKCANCELLIST]; "Persons without “+year+ " document”; “”; “”; allwithoutyear)