Skip to main content
1-Visitor
February 17, 2015
Solved

Rule problem with New Value

  • February 17, 2015
  • 1 reply
  • 1177 views

I'm trying to create a trigger via the CLI and when I run the following command the is set wrong. It should = the [New Value]. The script works... kinda.


im createtrigger --hostname=mks --description="My trigger description" --name="My trigger name" --assign="Some date field"="today" --rule="((field'["Field name"] ="Some Value"))"

Rule Tab

and

|

+- Field name = Some Value

I want it to display as follows

and

|

+- Field name[New Value] = Some Value

The single quote after field is suppose to represent a [New Value], how it is not. My question is why? What is wrong here?

    Best answer by JoeBartlett

    Hi Daniel,

    When I use the below command it works as expected. Could it be something to do with your use of double quotes on multiple strings in the same rule rather than just quoting the whole rule? Also, it looks like you've got an extra set of braces which are not needed in that rule.

    im edittrigger --rule="(field'[Type]=RFC)" TestTrigger

    1 reply

    21-Topaz I
    February 17, 2015

    Hi Daniel,

    When I use the below command it works as expected. Could it be something to do with your use of double quotes on multiple strings in the same rule rather than just quoting the whole rule? Also, it looks like you've got an extra set of braces which are not needed in that rule.

    im edittrigger --rule="(field'[Type]=RFC)" TestTrigger

    DanR.1-VisitorAuthor
    1-Visitor
    February 18, 2015

    Thanks Joe. That did it. I think I ran into a similar issue before. So I need to remember to only enclose the rule in double quotes, not the values inside the braces.