Skip to main content
1-Visitor
October 25, 2013
Solved

Import list when creating Pick Field

  • October 25, 2013
  • 2 replies
  • 1351 views

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.

    Best answer by jgorsline

    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.

    2 replies

    1-Visitor
    October 25, 2013

    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

    jgorsline1-VisitorAnswer
    1-Visitor
    October 25, 2013

    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.