This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Calculate automatic permissions by vbs

Hello friends,

I would like to know if the automatic permissions can be calculated by means of a vbs, depending on what they choose in a list of values? If you have any examples I would appreciate it. I don't give automatic permissions with the value of the list of values because the list of values is used in many other documents and it could interfere with other processes.

Thanks for your help,

  • I would strongly recommend to avoid this as calculating custom permissions will likely lead to problems later on. Consider for instance if your permission model changes and you need to update the permissions of all those objects for which you have calculated the permissions via script: how are you going to do it?

    With value list based automatic permissions, you can use two different property definitions with the same value list to decide whether to apply automatic permissions from the value list items or not. With the first property definition, check "Enable automatic permissions via this property" and for the second property definition, leave that option disabled. Now you can choose which property to use on the object depending on whether automatic permissions should be applied or not.

  • It is a new object so permissions should not be updated. The problem is the structure, how the vault is built, does not allow me to give the permissions to the list of values because they will apply to all the objects that use that list. That is why it would be better to give it a metadata that calculates the department that appears in the list of values and looks for the named access list that best suits it.

  • "The problem is the structure, how the vault is built, does not allow me to give the permissions to the list of values because they will apply to all the objects that use that list."

    You can avoid this by using two separate properties like described above.

    If you need further guidance, I recommend discussing this with your M-Files representative as it's easier to decide on the approach when you can have a look at the live vault together.