cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Import list when creating Pick Field

ptc-5150641
1-Visitor

Import list when creating Pick Field

I am using Integrity 9 and was curious if you can import a list when creating a pick list field? I have about 240 entries to enter into the pick list.

ACCEPTED SOLUTION

Accepted Solutions

Anthony,

There is not a built in way to import a list through the GUI when setting up a picklist. There is however the equivelent CLI command that can be very easy to format in an external text editor with your existing list into a command that will set up your pick list how you want.

The basic syntax is:

im createfield --name=<fieldname>--type=pick --picks=<text:value:image>,<text:value:image>...

A working example is:

im createfield --name=picklist1 --type=pick --picks=one:1:none,two:2:none,three:3:none

There are of course, many more options you can set for a pick list field, this is just the basics. The full list of options and syntax is on page 54 of the Admin CLI Reference guide - http://www.ptc.com/WCMS/files/143545/en/AdminCLIReference_2009SP7.pdf

Also, remember when adding values on the CLI, any entries with spaces need to be put in quotes.

View solution in original post

2 REPLIES 2
tdalon
12-Amethyst
(To:ptc-5150641)

Hi

It is possible by command line. (I've already done this with MKS2007)

You can set picklist values with :

im editfield --picks==$pickstr fieldname

Note: pickstr is something like '4.1':0,'4.1.0':1,'4.1.2':2,'4.1.3':3,'4.1.4':: value starts with 0.

If you want to add elements without changing the order of existing ones, you will need to read before the picklist value with a im viewfield command.

HTH

Anthony,

There is not a built in way to import a list through the GUI when setting up a picklist. There is however the equivelent CLI command that can be very easy to format in an external text editor with your existing list into a command that will set up your pick list how you want.

The basic syntax is:

im createfield --name=<fieldname>--type=pick --picks=<text:value:image>,<text:value:image>...

A working example is:

im createfield --name=picklist1 --type=pick --picks=one:1:none,two:2:none,three:3:none

There are of course, many more options you can set for a pick list field, this is just the basics. The full list of options and syntax is on page 54 of the Admin CLI Reference guide - http://www.ptc.com/WCMS/files/143545/en/AdminCLIReference_2009SP7.pdf

Also, remember when adding values on the CLI, any entries with spaces need to be put in quotes.

Announcements


Top Tags