Skip to main content
1-Visitor
December 3, 2014
Question

Need suggestion on Command

  • December 3, 2014
  • 2 replies
  • 2108 views

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.

    2 replies

    1-Visitor
    December 3, 2014

    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.

    21-Topaz I
    December 3, 2014

    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 (').

    1-Visitor
    December 3, 2014

    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.

    21-Topaz I
    December 3, 2014

    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.