Filtering my view using a variable as my criteria?

I created a view base on variable criteria. @Environment does not work on selection formula, so I tried using @GetprofileField. But, it doesn't seem to work. Is there any other way I can filter my view using a variable as my criteria? My code goes like this: addrbook := @GetProfileField("User Profile";"Department";@UserName); SELECT Form = "RF" & DepartmentCB = addrbook the objective is to filter the view base on user's department but I do not want to hardcode the department's name.
Try this alternative:

1. Create a view, categorizing it on the department (DepartmentCB) and save it. I would make a copy of the view you are trying to get to, now, or just insert a new column into the front of the view, categorized on the department, and save it.
2. Create a Page
3. Embed a view in the page (Create -> Embedded Element -> View)
4. Select the view you just created or modified from the dialog box and hit OK 5. Choose "Show Single Category" as the event.
6. Put your code here. I'd put either your @Environment (make sure it equals the name of one of the categories) or your @GetProfileField.
7. Save it.

This will make it a Page, not technically a View. But you can, using an outline or navigator, make that fact completely transparent to the user. This works in Notes and the Web.

Dig Deeper on Domino Resources - Part 6

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...