Creating dynamic view results

I have one primary view in a database that my users access via the web. Right now, I have Java Agents controlling the display of those pages based on certain selection criteria. What I would like to do rather than have Java Agents compile and run every time a user access the page is have an embedded view that only shows certain records depending on the user accessing it. For example, say I have a view template called “$$vwMyView” that has a shared field on it called “tmpUserOrgs”. When the user accesses my view (“vwMyView”), I only want those records to show up that have the organizations listed in the shared field. Say tmpUserOrgs has the value of “CV1”. If user X visits my site, I only want the records that correspond to the Organization of CV1 to show up in the embedded view. Is there a way to do this? Thanks in advance.

Subject: Creating dynamic view results

Well, you obviously need to have a way to determine that User X should see CV1 and user Y should see CV2. I’m guessing the result of this is what’s contained in your tmpUserOrgs field.

Just make your embedded view single-category. In the single-category event, use tmpUserOrgs as the formula (just the field name, no quotes or anything.)

Now add a column to the far left of your view. It should contain the field on the documents that evaluates to CV1, CV2, etc. Make this column categorized and hidden.

The view template should now display the embedded view, showing only the single category CV1 if user X is logged in and tmpUserOrgs evaluates to CV1.

Subject: RE: Creating dynamic view results

I get what you’re saying. I’ll try that and let everyone know what my solution was once I figure it out. I’ve been trying to do what you said but maybe I’ve been doing it wrong. I’ll double check and get back to you. Thanks!