Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
amien
Specialist
Specialist

reduce data in maco

i open a certain document in accesspoint. that document contains a certain selection.

how i want a macro that reduces the data on openingen the document based on the current selection.

is this even possible? seems like an on opening trigger doesnt work on server .. plus when i put the ActiveDocument.ReduceData behind a button, that also seems not to work.

is there any other solution? i'm opening my document with a certain bookmark. Bookmark contains a selection and now i want to reduce the data based on that selection. my goal is not really to drop the unneeded data, but to make it impossible for the end user to select/see other data than the selected data in the bookmark

3 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

This sounds like a security issue, and it needs to be resolved using the security features (Section Access). You'll need to link your users to the specific data elements that they have access to, and use the setting "Initial Data Reduction Based on Section Access".

I realize, it may not be as flexible as rducing data based on a bookmark, but then, again, if this is a security issue, it shouldn't require such a great flexibility - you either have access to certain data, or you don't.

The problem with implementing your approach is the the document might be "Open" all day long on the server, and each individual user just open a new session. So, the "On Open" trigger can't be used for that purpose.  

amien
Specialist
Specialist
Author

Thanks for your reply.

i cant use section access, because i dont want to reduce the data based on the user the is accessing. I use a parameter in my url. So the data should be reduced based on the parameter. and Section access can't do that.

Not applicable

What you can do is, you can write a document OnOpen trigger to Lock the selection on that field to the value being passed.

And your application should already have a Field Event Trigger for that field

The field event trigger should be for the "OnUnlock" event of that field. And the Action for that trigger should be "Lock Field" with the same field name as parameter.

That should do the trick.

Now if you want to give access to some of the people and restrict access to others, then you should put that if condition in your OnOpen trigger macro.