Advanced search in Portfolio Server


I am using Portfolio Desktop Client for Portfolio Server 10.2.0 (15). I have a custom field of organization codes with entries similar to: “T, CO, MI, AC, JO”. That is a single field entry. I want to be able to find any record with an organization code beginning with the letter “C”. The problem is that, in this case, the code “CO” is in the middle of the field. Can Portfolio execute a search query like that?

I also have text fields with lists of names. I want to be able to submit a list of 100 names and ask Portfolio to find any record that contains any of those names. Is that possible?


Not really. Assuming every term used a comma+space delimiter and no terminal delimiter you could search for:

First finds CO as the first term and the second finds it in any other position. But, as you later show you’ve hundreds of possible values. The above won’t comfortably scale to non-frustating use.

Do you use the Mac or PC client or do you have a choice? (each offers different avenues)

Although it will seem like extra work, a more sensible approach to the above problem is to port** that data to a multi-value field so each code (or name) is a discrete value. You could use the built-in Keywords field or if that already has a discrete use, use a custom multi-value text field (which works in the same manner). This allows you to ask:

…even if the field contains other values besides ‘CO’.

** best discussed as a separate topic if you want to explore that, to avoid thread drift.

You go on to ask:

This will either need scripting (Mac AppleScript or Windows VB) or - if you are an Enterprise licence user - using the new v10.2+ API which needs Java/C# or PHP programming skills. If you use SQL catalogues (Enterprise level, again) then you could also consider writing a custom SQL [sic] query.

Portfolio can’t - except perhaps via the new API - directly return the set you want. However, a script could iterate the name list and mark a custom field in records when a match was found. If after each name you re-queried so as to only search records with no existing name match (as you only care that any list name is matched at least once) then the number of records iterated for each name in the list should fall as the process goes on. The process ends either after all names have been run or earlier if there are no records left that haven’t already matched a name.

Storing the list of names as a custom field pre-defined list should also help with the process, especially if scripting the desktop client.


Your reply to my first question is brilliantly simple with a very slight modification. I am actually looking for text strings that begin with the letter C. So, a conventional Portfolio query will work without scripting. Field “starts with” “C” or Field “contains” “, C” will return my desired set of records.

Thank you very much!


Great! Simplicity wins. :smiley: