Getprofile not working in view

Hi ,I am using the following formula in my view selection, it is not working please advice me.

pls note that i have posted it on 4.5 forum, i got reply that profile won’t work in view selection, i don’t find any restriction in help, any idea?

regds

soma


hotval:=@GetProfileField(“miscform”;

“hot_x”);

SELECT (FORM=“mainform” ) &( (status_k=“In-Progress”)| (status_k=“Won”))&(@TextToNumber(@Left(prob_k;“%”))>=hotval) &

(FORM=“mainform” ) &( (status_k=“In-Progress”)| (status_k=“Won”))&(@TextToNumber(@Left(prob_k;“%”))<=99)

Subject: getprofile not working in view

in the help:

Syntax

@GetProfileField( profilename ; fieldname; uniqueKey )

Parameters

profilename

Text. The name of the profile document that contains the field you want to access.

fieldname

Text. The name of the field you want to access.

uniqueKey

Text. Optional. The unique key that identifies a profile document.

Return value

fieldvalue

The value of the field.

Usage

This function does not work in column, hide-when, section editor, or view selection formulas. You can use it in toolbar buttons or agents.

You can use this function on the Web. Use @SetProfileField to create a profile document in a Web application. If no profile document by the name specified as the first parameter to @SetProfileField exists, Notes creates one. This function enables you to access the fields in that profile document.

There is no way to create some kind of ‘dynamic’ view selection formules. You cannot use profile fields, nor environment variables or whatever parameter.

Basicly, there are two methods :

Mark the needed documents with a field (eg with an agent) and base your selection formula on that field

Use a folder instead of a view, and populate the view on the fly with some code

and if you were thinking about setting the selection formula trough LotusScript : think twice!

Subject: RE: getprofile not working in view

Rather than set the profile field, which as Joris has shown is not going to work, you could assign the NotesView.SelectionFormula property to contain the value you want.

Subject: take care …

assigning a selection formula via LotusScript has its caveats …

I found that the only way to be sure that a view, altered via LS, is displayed correctly, is top close and reopen the db.

Otherwise it’s not allways clear when the changes become visible.