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.
This Content Component encountered an error
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.