Our vBulletin migration is complete.
Welcome vBulletin users! All content and user information from the Micro Focus Forums (vBulletin) site has been migrated to this site. READ MORE.
Highlighted
Valued Contributor.. imi_qn Valued Contributor..
Valued Contributor..
452 views

How to loop through all Project-Lists within Customization?

Jump to solution

Hi there,

I've a question regarding workflow. 

I'm struggling to find a solution. The final goal would be to filter out/delete Project-Lists if they are containing a specific name convention (eg.: Domain_List_%).  As a first step I need to write a script which looping through all of the Project-List-Objects and printing out it's name, a simple msgbox should be enough. Till now I could only count them with the code below, and I was unable to find a solution between the existing threads.  

Set cust = TDConnection.Customization
cust.Load
listCount = cust.Lists.Count
msgbox listCount
Set cust = Nothing

Thanks for your help in advance.

0 Likes
1 Solution

Accepted Solutions
Chris_Grz Outstanding Contributor.
Outstanding Contributor.

Re: How to loop through all Project-Lists within Customization?

Jump to solution

Use the ListByCount method, as in:

Set custLists = m_server.Customization.lists
For iList = 1 To custLists.Count
      Set custList = custLists.ListByCount(iList)
      MsgBox custList.Name
      Set custList = Nothing
Next iList

When comparing list names, use either UCase or LCase functions to avoid mismatches on capitalization.

0 Likes
1 Reply
Chris_Grz Outstanding Contributor.
Outstanding Contributor.

Re: How to loop through all Project-Lists within Customization?

Jump to solution

Use the ListByCount method, as in:

Set custLists = m_server.Customization.lists
For iList = 1 To custLists.Count
      Set custList = custLists.ListByCount(iList)
      MsgBox custList.Name
      Set custList = Nothing
Next iList

When comparing list names, use either UCase or LCase functions to avoid mismatches on capitalization.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.