psciascia Honored Contributor.
Honored Contributor.
228 views

Create a user-defined property based on existing property values

Jump to solution

In the ChangeRequest's Platform property, we have several values. I would like to create a new user-defined property that will use the same values as Platform. Can I do that, either via the command line or the SDK?

0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

Re: Create a user-defined property based on existing property values

Jump to solution

you can use the describe (schema) command to query the enums for the source enumerated property

describe {type}{.property} {-s "server specifier"}

the output of that is a list of enums.

you can then iterate through that list, and call add-enum accordingly for your new(er) enumerated property, thereby achieving the copy.

 

4 Replies
Micro Focus Expert
Micro Focus Expert

Re: Create a user-defined property based on existing property values

Jump to solution

You can do anything in StarTeam via the SDK.

 

via the command line...

Use the add-property command to add a property to a type

Use the add-enum command to add enums to an enumerated property. 

 

which will be simpler than writing an sdk based program..

0 Likes
psciascia Honored Contributor.
Honored Contributor.

Re: Create a user-defined property based on existing property values

Jump to solution

>>Use the add-enum command to add enums to an enumerated property. 

In this case I want to "copy" the enums of one property to the new. I'm not sure of the syntax of add enums but can I pipe it from a get enum?

Let me know if I am unclear (I'm not sure I am) 🙂

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Create a user-defined property based on existing property values

Jump to solution

you can use the describe (schema) command to query the enums for the source enumerated property

describe {type}{.property} {-s "server specifier"}

the output of that is a list of enums.

you can then iterate through that list, and call add-enum accordingly for your new(er) enumerated property, thereby achieving the copy.

 

psciascia Honored Contributor.
Honored Contributor.

Re: Create a user-defined property based on existing property values

Jump to solution

Ok thanks.

It looks like I'm going to have to brush up on my command line. I've done 95% of my work through the SDK for the past 2 years, so even a concept such as iterating through a result seems a little intimidating. 

Hey, I'll take it as a learning opportunity !

 

Thanks Anil!

 

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.