Dinamic View

I have embedded view in form. When user open document, created by this form, some documents shown in thembedded view. In “queryopen” of document I have handler, wich dinamically set embedded view selection in dependance of user role, who open document…

view.SelectionFormula = formula

Everything is work while user have “Designer” or “Manager” in ACL.

Can I dinamically change view selection for all users?

Subject: Dinamic View

Ah - you need to be careful changing the view selection in that way. It will also cause problems when two users have documents from that form open at the same time.

Your code will physically alter the selection formula on the single copy of the view in the database. The 2nd user will change the formula and it may affect what the 1st user sees.

The better way to do this is to use the “Show Single Category” option on the embedded view properties in the form design.

You can set this item to evaluate a formula. Just add a new categorised column to the view that shows the options your formula will evalute to.

i.e.

if your first column is categorised by “Admin”, “User”, “Developer”, your single category formula on the form would evaluate to those three options.

The embedded view will then show only the contents of the relevant category

HTH

kiers

Subject: RE: Dinamic View

Yes, You are right. It’s good idea and the best way.

Thanks.