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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Need suggestion on Command

ptc-6083798
1-Visitor

Need suggestion on Command

Hi

I am just trying to add constraint through following command,

im edittype --Port=7000 --addFieldRelationship=constraintrule="((field["Regulated State/Province/City"] <>"California") and (field["Regulated State/Province/City"] != ""))":"Local District"="Houston-Galveston-Brazoria,Dallas- Fort Worth,Beaumont,Port Author",description="desc" typename

but this is not working as expected. is this command correct?

because though i am specifying typename it is asking me "This command accept selection of exactly one type"

command.PNG

if I am wrong please help me in getting correct command.

4 REPLIES 4
DanR.
12-Amethyst
(To:ptc-6083798)

Rahul,

I noticed something. Try this:

im edittype --Port=7000 --addFieldRelationship=constraintrule="((field["Regulated State/Province/City"] <>"California") and (field["Regulated State/Province/City"] != ""))":"Local District"="Houston-Galveston-Brazoria,Dallas- Fort Worth,Beaumont,Port Author" --description="desc" Function

The problem is most likely in the description parameter.

It is probably due to the use of double-quotes all throughout the command. I would suggest wrapping the entire constraint rule value in double quotes(") like you have and then inside that, for the field names and values, use single quotes instead (').

DanR.
12-Amethyst
(To:JoeBartlett)

Joe,

I've ran in to that issue before, however, what resolved it was single quote (') around the entire parameter and double quote (") around the field names and values.

JoeBartlett
21-Topaz I
(To:DanR.)

It doesn't really matter which way you do it, as long as the command can tell the difference between the whole command string and the individually-quoted values within it.

Announcements


Top Tags