Workflow list variable

Last post 03-19-2020, 12:26 PM by StorageGuy007. 3 replies.
Sort Posts: Previous Next
  • Workflow list variable
    Posted: 03-17-2020, 9:51 AM

    Hi, how can I check, if a list variable is empty or not? I would need a result value true or false for a decission.

    Thank you!

  • Re: Workflow list variable
    Posted: 03-19-2020, 11:15 AM

    Hi rba76,

    depends on what you are doing but this may help.

    once you run this activity you can then use a decision activity to check the output of the activity "ExistsInList"

    the output of ExistsInList has "exists" value


    Checks if a given element exists in a specific list. This activity will return true or false if the element exists in the list. The following inputs are required:

    • listToCheck

      A string value which defines the name of the list that you want to check.

    • itemToCheck

      An object value which specifies the item that you want to check in the list.

    Gary Seibak
    Technical Account Manager - Commvault
  • Re: Workflow list variable
    Posted: 03-19-2020, 11:44 AM

    Hi StorageGuy,

    I know already the activity "ExistsInList". This is good when I search for an item in a list. But I just want to check if a list contains items or not. 

    The decision would look like this: If a list contains one or more items then return 1 if the list contains no items return 0.

    Do you have an idea?

  • Re: Workflow list variable
    Posted: 03-19-2020, 12:26 PM

    Hi rba76,

    got it.

    if you have a list called ListOfClients for example you can use a decision activity as seen below.

    xpath:{/workflow/variables/ListOfClients} != null && xpath:{/workflow/variables/ListOfClients}.size()>0

    Gary Seibak
    Technical Account Manager - Commvault
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.
Copyright © 2020 Commvault | All Rights Reserved. | Legal | Privacy Policy