Please enable JavaScript to view this site.

QPR Knowledge Base 2023.1

  •      
  • Navigation: Developer's Guide > QPR API > The Object Model > QPR Modeling > PGApplication Commands

    CreateFolder

    Scroll Prev Top Next More

    Revision history:

    Introduced in QPR 7.3.2

     

    Creates a new folder to the server under the defined parent folder. In the case the parent folder is 0, the new folder is created to the root level.

     

    Synopsis:

     

    PGApplication.CreateFolder(FolderName, ParentFolderId, out FolderId)

     

    Parameters:

     

    FolderName: String. Name of the new folder.        

    ParentFolderId: Integer. ID of the server folder under which the new folder is created. 0 creates the new folder under the main level.

    out FolderId: Integer. Variant for storing the ID of the new folder created with this function.

     

    Required Rights:

     

    Administrator.

     

    Return Values:

    Below are listed the return values that this function can return:

     

    RV_SUCCESS

    RV_APPLICATION_QUIT_CALLED

    RV_NOT_CONNECTED_TO_SERVER

    RV_NOT_AUTHENTICATED

    RV_ONLY_ADMINISTRATORS_CAN_CREATE_AND_MODIFY_FOLDERS

    RV_FOLDER_DOES_NOT_EXIST

    RV_INVALID_MODEL_FOLDER_NAME

    RV_MODEL_FOLDER_TEMPLATE_ALREADY_EXISTS

     

    Example Procedure:

     

    iResult = PGApplication.CreateFolder("New Folder", 0, outFolder)