SQL CommServ query to select a client group

Last post 01-08-2019, 7:34 PM by ameykarandikar. 9 replies.
Sort Posts: Previous Next
  • SQL CommServ query to select a client group
    Posted: 01-07-2019, 7:53 AM

    I am using the SQL CommServ query below to open a CommServ workgroup folder that I select. However, I need the SQL CommServ query to open a specific workgroup folder without putting in the name of the workgroup folder.

    Select  c.name
    From APP_Client c
    INNER JOIN APP_ClientGroupAssoc a ON c.id = a.clientId
    WHERE a.clientGroupId in (Select id From APP_ClientGroup Where name = 'xpath:{/workflow/inputs/clientGroup/clientGroupName}')

    Charles Lavender
  • Re: SQL CommServ query to select a client group
    Posted: 01-07-2019, 10:26 AM
    Hi Charles,

    Can you give us some more information regarding how you want to pull the client group? The query you have above pulls a specific client group id based on the name of the client group. Are you looking to replace the client group name with some other identifiable parameter, or is the goal here not to have to manually type the client group name at the beginning of the workflow as an input? If the latter, you could before this query populate a list of client groups to choose from, and have the choice feed into a workflow variable which can be pulled within this query.
  • Re: SQL CommServ query to select a client group
    Posted: 01-07-2019, 10:42 AM

    my goal is to hard code a specific client group folder name into the workflow so that the query will go to this client group folder with no user intervention. This query will never change and will always go to this folder.


    Charles Lavender
  • Re: SQL CommServ query to select a client group
    Posted: 01-07-2019, 11:08 AM

    Try this:

    Select  c.name
    From APP_Client c
    INNER JOIN APP_ClientGroupAssoc a ON c.id = a.clientId
    WHERE a.clientGroupId in (Select id From APP_ClientGroup Where name = 'HardCodeYourGroupNameHere')
  • Re: SQL CommServ query to select a client group
    Posted: 01-07-2019, 11:37 AM

    Did that work?

  • Re: SQL CommServ query to select a client group
    Posted: 01-07-2019, 1:26 PM

    No that didn't work. My goal is for this workflow to function with no user input. I'm still getting the input screen to enter the ClientGroup name. However the correct name is there but I still have tp press ok for the workflow to start.


    Charles Lavender
  • Re: SQL CommServ query to select a client group
    Posted: 01-07-2019, 5:21 PM

    If you start the workflow from the workflow listing screen then currently there isnt a way to skip the initial input dialog. However you can configure a quick access tool that starts this workflow from say the commcell level and there you can pick the "Click Skip input dialog and execute workflow immediately" option.

    http://documentation.commvault.com/commvault/v11/article?p=3886.htm

  • Re: SQL CommServ query to select a client group
    Posted: 01-08-2019, 10:07 AM

    That information worked so my issue is now resolved. Thanks


    Charles Lavender
  • Re: SQL CommServ query to select a client group
    Posted: 01-08-2019, 5:42 PM

    I only see this as a workaround. The real issue is why is the workflow asking for user input - they don't have to. There are two main ways to get a workflow to prompt a user - in the properties of the workflow itself (which will prompt the user for input before the workflow runs) and as a step in the workflow (which will prompt the user at some point while the workflow is running).

    From your description it sound like the former - the workflow is prompting the user for some input at the beginning, before it runs. Wouldn't it be better to remove the prompting rather than use some technique to get around it?

    Try editing the workflow. Don't click on a step (that will select that step - we want to stay on the worklow itself). Look at the Inputs tab and see what's there. Remove anything there.

    Here is a screen grab of the inputs tab which shows how to add an input. Use this tab to identify and remove user inputs.

    As for the second type of input (during the execution of the workflow) there is an easy way to turn them all off. Edit the workflow properties again (just like above) but this time go to the General tab. Look for the property Start Interactive Session. Make sure it's False. The workflow can't ask for user input if there is no interactive session. See here http://documentation.commvault.com/commvault/v11/article?p=49569.htm

  • Re: SQL CommServ query to select a client group
    Posted: 01-08-2019, 7:34 PM

    Hi Craig,

    Yes, it is a workaround. The reason the workflow screen works this way is because that is the only place where you can either run the workflow now or schedule it for later and also pick a specific workflow machine to run it on.

     

    The forms screen in webconsole however works exactly the way you described, if you pick the "start interactive" option, because its an end user interface and you dont get the scheduling and other options there.

The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Close
Copyright © 2019 Commvault | All Rights Reserved. | Legal | Privacy Policy