Moving attachments within document

I have a database where there are sometimes 10 attachments attached to a document.  I'd like to secure access to those attachments by restricting based on userroles.

In order to do that I believe I need to move those attachments to a richtext field in order to take advantage of the 'hide when' feature.

What is the best way to move all of those attachments to a field within the same document when it appears that they were originall attached to the 'body'.

Who is Participating?
cezarFConnect With a Mentor Commented:
or use the $V2AttachmentOptions field. set it "0" or "1" to hide or show attachments
You cannot use the hide-when features in a rich-text field, they are unpredictable.

Instead use subforms, one with the rich text field and the attachments, and one without, or one rich text field per attachment and add or remove subforms.. although the robustness decreases with more subforms (each is an additional hit on the server)

The subforms can be computed, so when someone of a certain role opens the document, the rich text subform shows, else it doesn't.

Downside is that refreshing the form doesn't change the subforms, so if someone opens in read mode and switches to edit mode, you have to close and reopen the form to get the subform to load.
marilyngConnect With a Mentor Commented:
This is a really nice explanation of $V2AttachmentOptions

It is, at best, an old chestnut that works and most times does not. :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.