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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Rule problem with New Value

DanR.
12-Amethyst

Rule problem with New Value

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?

ACCEPTED SOLUTION

Accepted Solutions
JoeBartlett
21-Topaz I
(To:DanR.)

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

View solution in original post

2 REPLIES 2
JoeBartlett
21-Topaz I
(To:DanR.)

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.
12-Amethyst
(To:JoeBartlett)

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.

Announcements


Top Tags