Script: Make a folder a root folder

Converts an existing folder to a root folder

Product line

Standard

|

Expert

Operating mode

CLOUD ABO

|

ON-PREMISES

Modules

Services & CRM

Budget & Phases

Purchases

Resource Planning

Business Intelligence

Created: 13.03.2017
Machine translated
Updated: 10.10.2024 | New script for selectedobjects from Vertec 6.7.0.12.

Converts an existing folder to a root folder and appends it to the current user group for view.

The folder is moved to the root and is only visible to the current user group. It is removed from its original location.

version description Scripting
6.1 Script for Vertec versions before 6.7.0.12 and for running in Script Editor  for all versions. The folder is stored via the Internal id indicated. Convertfoldertorootfolderargobject.py
6.7.0.12 Used selectedobjects . The folder is queried in a selection dialog. Convertfoldertorootfolder.py

Execute

The script must be run on the User Group that you want the root folder to be visible to.

Script Text

# coding: windows-1252
#
#---Bezeichnung: Aus einem Ordner einen Rootordner machen
#   Klasse: Benutzergruppe
#   Selectedobjectsscript: Yes
#   Condexpression:
#   EventType: Kein
#   EventClass:
#   EventMembers:
#   ExtendedRights: N
#---Wandelt einen bestehenden Ordner in einen Rootordner um und
#   fügt ihn den selektierten Benutzergruppen zur Ansicht an.
#   Der entsprechende Ordner wird in einem Dialog abgefragt.
#---07.03.2017, Vertec AG: erstellt.
#   10.10.2024, sth: An selectedobjects ab Vertec 6.7.0.12 angepasst.

def main(grouplist):
    ordner = vtcapp.selectobjectintree("Ordner auswählen, der zum Rootordners werden soll ", [], browsefilter="", selectfilter="AbstractOrdner")
    if ordner:
        for gruppe in grouplist:
            gruppe.persrooteintraege.append(ordner)
            ordner.parentordner = None

main(selectedobjects)