How to retrieve the folders craeted into a cabinet?

GyanSingh
GyanSingh Member
edited July 28, 2014 in Documentum #1

Hi All,

I have created one query for accessing the folders created into a project:

Select object_name From als_folder where folder('/folder1',descend);

Now I want variable in place of folder1.

Please any one help me?

Tagged:

Comments

  • AshishSrivastava
    edited July 21, 2014 #2

    GyanSingh

    When you say you need a variable - what do you mean?

    Do you have to run the same query for multiple values of folder1 ?

    Please explain your scenario

    Kind Regards,

    Ashish Srivastava

  • GyanSingh
    GyanSingh Member
    edited July 21, 2014 #3

    Hello Ashish,

    Yes, I have to run the same query for multiple values of folder1.

    I have one template to generate reports and in that I need a general query with folder1 as variable.

    Thanks & Regards,

    Gyan Singh

  • AshishSrivastava
    edited July 21, 2014 #4

    Gyan,

    I think what I understood is you have few java classes and you are trying to create DQL template so that same query can be used multiple times by passing different values

    If that is the case , take a look at last two sections of https://code.google.com/p/dctm-commons/wiki/Using

    There are various ways of DQL templating , if you can share your code base _ can take a look and try for this query

    Please note - you can pass folder/cabinet Id also in place of folder1 in your query

    Let me know if it helped in any way

    Kind Regards,

    Ashish Srivastava

  • GyanSingh
    GyanSingh Member
    edited July 22, 2014 #5

    Hi Ashish,

    I have to write this query for dqMan. And I want folder1 as variable but I am not able to make it variable in dqMan.

    Thanks & Regards,

    Gyan Singh

  • christian_meier
    edited July 23, 2014 #6

    Hi Gyan,

    please try the following query for dqMan. The tool asks for the variable each time you execute it. In addition you can add the query to your favorites.

    select object_name from als_folder where folder('/{var1}', descend);

    Regards,

    Christian

  • AshishSrivastava
    edited July 23, 2014 #7

    Will try Gyan in dqman and let you know

  • AshishSrivastava
    edited July 23, 2014 #8

    Gyan,

    Below query works in dqman



    select * from custom_folder_type where folder('{var1}', descend);

    It gives a prompt where I put the folder path like /cabinetName/folderName

    If this is what you are looking for, you can use it this way

    The query that Christian provided will also work but you need to provide the folder path as cabinetName/folderName (without initial /)


    Let me know if it helped in any way

    Kind Regards,

    Ashish Srivastava

  • AshishSrivastava
    edited July 23, 2014 #9

    Gyan,

    I was also able to add a query template in dqman with below query

    Select r_object_id,object_name,acl_name,r_folder_path from dm_folder where folder('{*}',DESCEND) order by object_name;

    or with

    select * from dm_folder where folder('{*}', descend);

    You can go to Documentation -> Add Documentation and add your query template in Cabinets/Folder under Repository Navigator under DQL Comman View

    I think this is what you are looking for

    Please mark the post as Helpful or Correct if it is

    Kind Regards,

    Ashish Srivastava

  • GyanSingh
    GyanSingh Member
    edited July 28, 2014 #10

    Thanks to both of you. It is fine for me.