Skip to main content
1-Visitor
September 22, 2014
Solved

Need help with command-line syntax of 'im editfield'

  • September 22, 2014
  • 1 reply
  • 1604 views

Hi,

Can someone provide an example of the 'im editfield' command that sets the set of a pick field from active to inactive?

I have tried the following, and a few variations, without success.:

im editfield --picks="value=9,Inactive" "my test field"

Our ultimate intent is coding this in a script. So an example in JavaScript that's invoked by a manual trigger would be even better.

-Sean

    Best answer by mkiessling

    Hi Sean,

    you can set pick fields to active, if you list them in your command.

    The other way round: pick fields are set to inactive, if you don't list them.

    E.g.: Field "my test field" with pick values "green" (0), "yellow" (1) and "red" (2)

    The command

    im edit field --picks=green:0:none,red:2:none "my test field"

    sets the picks "green" and "red" to active, and sets "yellow" to inactive.

    The syntax for the --picks-option is: <text>:<value>:<image>,...

    1 reply

    12-Amethyst
    September 24, 2014

    Hi Sean,

    you can set pick fields to active, if you list them in your command.

    The other way round: pick fields are set to inactive, if you don't list them.

    E.g.: Field "my test field" with pick values "green" (0), "yellow" (1) and "red" (2)

    The command

    im edit field --picks=green:0:none,red:2:none "my test field"

    sets the picks "green" and "red" to active, and sets "yellow" to inactive.

    The syntax for the --picks-option is: <text>:<value>:<image>,...

    1-Visitor
    September 24, 2014

    Hi Markus,

    Thanks for the information. I'll give that a try.

    -Sean