This payload finally worked:
{
"rules": [
{
"subjectField": "Country",
"operator": "is",
"values": [
"Germany"
],
"altLabel": "State",
"pickListValues": [
{
"label": "Select..."
},
{
"label": "CO",
"value": "CO"
}
]
},
{
"subjectField": "Country",
"operator": "is",
"values": [
"Austria"
],
"altLabel": "State",
"pickListValues": [
{
"label": "Select..."
},
{
"label": "CT",
"value": "CT"
}
]
}
],
"ruleType": "show"
}
Hey i have a similar problem, whenever i try to update visibility rules i get the error
{
success: false,
errors: [ { message: 'Invalid ruleType.', code: '701' } ],
requestId: '9141#190c6509664',
warnings: []
}
my visibility rules:
{
"ruleType": "show",
"rules" : [
{
"subjectField": "Country",
"operator": "is",
"values": [
"Australia"
],
"altLabel": "State",
"picklistFilterValues": [
{
"label": "State *"
},
{
"label": "Australian Capital Territory",
"value": "Australian Capital Territory"
},
{
"label": "New South Wales",
"value": "New South Wales"
},
{
"label": "Northern Territory",
"value": "Northern Territory"
},
{
"label": "Queensland",
"value": "Queensland"
},
{
"label": "South Australia",
"value": "South Australia"
},
{
"label": "Tasmania",
"value": "Tasmania"
},
{
"label": "Victoria",
"value": "Victoria"
},
{
"label": "Western Australia",
"value": "Western Australia"
}
]
},
{
"subjectField": "Country",
"operator": "is",
"values": [
"China"
],
"altLabel": "State",
"picklistFilterValues": [
{
"label": "State *"
},
{
"label": "Anhui",
"value": "Anhui"
},
{
"label": "Beijing",
"value": "Beijing"
},
{
"label": "Chongqing",
"value": "Chongqing"
},
{
"label": "Fujian",
"value": "Fujian"
},
{
"label": "Gansu",
"value": "Gansu"
},
{
"label": "Guangdong",
"value": "Guangdong"
},
{
"label": "Guangxi",
"value": "Guangxi"
},
{
"label": "Guizhou",
"value": "Guizhou"
},
{
"label": "Hainan",
"value": "Hainan"
},
{
"label": "Hebei",
"value": "Hebei"
},
{
"label": "Heilongjiang",
"value": "Heilongjiang"
},
{
"label": "Henan",
"value": "Henan"
},
{
"label": "Hubei",
"value": "Hubei"
},
{
"label": "Hunan",
"value": "Hunan"
},
{
"label": "Jiangsu",
"value": "Jiangsu"
},
{
"label": "Jiangxi",
"value": "Jiangxi"
},
{
"label": "Jilin",
"value": "Jilin"
},
{
"label": "Liaoning",
"value": "Liaoning"
},
{
"label": "Macao",
"value": "Macao"
},
{
"label": "Nei Mongol",
"value": "Nei Mongol"
},
{
"label": "Ningxia",
"value": "Ningxia"
},
{
"label": "Qinghai",
"value": "Qinghai"
},
{
"label": "Shaanxi",
"value": "Shaanxi"
},
{
"label": "Shandong",
"value": "Shandong"
},
{
"label": "Shanghai",
"value": "Shanghai"
},
{
"label": "Shanxi",
"value": "Shanxi"
},
{
"label": "Sichuan",
"value": "Sichuan"
},
{
"label": "Tianjin",
"value": "Tianjin"
},
{
"label": "Xinjiang",
"value": "Xinjiang"
},
{
"label": "Xizang",
"value": "Xizang"
},
{
"label": "Yunnan",
"value": "Yunnan"
},
{
"label": "Zhejiang",
"value": "Zhejiang"
}
]
},
{
"subjectField": "Country",
"operator": "is",
"values": [
"USA"
],
"altLabel": "State",
"picklistFilterValues": [
{
"label": "State *"
},
{
"label": "Alabama",
"value": "Alabama"
},
{
"label": "Alaska",
"value": "Alaska"
},
{
"label": "Arizona",
"value": "Arizona"
},
{
"label": "Arkansas",
"value": "Arkansas"
},
{
"label": "Armed Forces Americas",
"value": "Armed Forces Americas"
},
{
"label": "Armed Forces Pacific",
"value": "Armed Forces Pacific"
},
{
"label": "Armed Forces",
"value": "Armed Forces"
},
{
"label": "California",
"value": "California"
},
{
"label": "Colorado",
"value": "Colorado"
},
{
"label": "Connecticut",
"value": "Connecticut"
},
{
"label": "Delaware",
"value": "Delaware"
},
{
"label": "Florida",
"value": "Florida"
},
{
"label": "Georgia",
"value": "Georgia"
},
{
"label": "Hawaii",
"value": "Hawaii"
},
{
"label": "Idaho",
"value": "Idaho"
},
{
"label": "Illinois",
"value": "Illinois"
},
{
"label": "Indiana",
"value": "Indiana"
},
{
"label": "Iowa",
"value": "Iowa"
},
{
"label": "Kansas",
"value": "Kansas"
},
{
"label": "Kentucky",
"value": "Kentucky"
},
{
"label": "Louisiana",
"value": "Louisiana"
},
{
"label": "Maine",
"value": "Maine"
},
{
"label": "Maryland",
"value": "Maryland"
},
{
"label": "Massachusetts",
"value": "Massachusetts"
},
{
"label": "Michigan",
"value": "Michigan"
},
{
"label": "Minnesota",
"value": "Minnesota"
},
{
"label": "Mississippi",
"value": "Mississippi"
},
{
"label": "Missouri",
"value": "Missouri"
},
{
"label": "Montana",
"value": "Montana"
},
{
"label": "Nebraska",
"value": "Nebraska"
},
{
"label": "Nevada",
"value": "Nevada"
},
{
"label": "New Hampshire",
"value": "New Hampshire"
},
{
"label": "New Jersey",
"value": "New Jersey"
},
{
"label": "New Mexico",
"value": "New Mexico"
},
{
"label": "New York",
"value": "New York"
},
{
"label": "North Carolina",
"value": "North Carolina"
},
{
"label": "North Dakota",
"value": "North Dakota"
},
{
"label": "Ohio",
"value": "Ohio"
},
{
"label": "Oklahoma",
"value": "Oklahoma"
},
{
"label": "Oregon",
"value": "Oregon"
},
{
"label": "Pennsylvania",
"value": "Pennsylvania"
},
{
"label": "Rhode Island",
"value": "Rhode Island"
},
{
"label": "South Carolina",
"value": "South Carolina"
},
{
"label": "South Dakota",
"value": "South Dakota"
},
{
"label": "Tennessee",
"value": "Tennessee"
},
{
"label": "Texas",
"value": "Texas"
},
{
"label": "Utah",
"value": "Utah"
},
{
"label": "Vermont",
"value": "Vermont"
},
{
"label": "Virginia",
"value": "Virginia"
},
{
"label": "Washington DC",
"value": "Washington DC"
},
{
"label": "Washington",
"value": "Washington"
},
{
"label": "West Virginia",
"value": "West Virginia"
},
{
"label": "Wisconsin",
"value": "Wisconsin"
},
]
}
]
}
Please edit your post to use the syntax highlighter ("Insert/Edit Code Sample" in the button bar) so it's readable. Then we'll continue.
{
success: false,
errors: [ { message: 'Invalid ruleType.', code: '701' } ],
requestId: '9141#190c6509664',
warnings: []
}
Getting above error, my visibility Rules are:
{
"ruleType": "show",
"rules" : [
{
"subjectField": "Country",
"operator": "is",
"values": [
"Australia"
],
"altLabel": "State",
"picklistFilterValues": [
{
"label": "State *"
},
{
"label": "Australian Capital Territory",
"value": "Australian Capital Territory"
},
{
"label": "New South Wales",
"value": "New South Wales"
},
{
"label": "Northern Territory",
"value": "Northern Territory"
},
{
"label": "Queensland",
"value": "Queensland"
},
{
"label": "South Australia",
"value": "South Australia"
},
{
"label": "Tasmania",
"value": "Tasmania"
},
{
"label": "Victoria",
"value": "Victoria"
},
{
"label": "Western Australia",
"value": "Western Australia"
}
]
},
{
"subjectField": "Country",
"operator": "is",
"values": [
"China"
],
"altLabel": "State",
"picklistFilterValues": [
{
"label": "State *"
},
{
"label": "Anhui",
"value": "Anhui"
},
{
"label": "Beijing",
"value": "Beijing"
},
{
"label": "Chongqing",
"value": "Chongqing"
},
{
"label": "Fujian",
"value": "Fujian"
},
{
"label": "Gansu",
"value": "Gansu"
},
{
"label": "Hunan",
"value": "Hunan"
},
{
"label": "Jiangsu",
"value": "Jiangsu"
},
{
"label": "Jiangxi",
"value": "Jiangxi"
},
{
"label": "Jilin",
"value": "Jilin"
},
{
"label": "Liaoning",
"value": "Liaoning"
},
{
"label": "Macao",
"value": "Macao"
},
{
"label": "Tianjin",
"value": "Tianjin"
},
{
"label": "Xinjiang",
"value": "Xinjiang"
},
{
"label": "Xizang",
"value": "Xizang"
},
{
"label": "Yunnan",
"value": "Yunnan"
},
{
"label": "Zhejiang",
"value": "Zhejiang"
}
]
},
{
"subjectField": "Country",
"operator": "is",
"values": [
"USA"
],
"altLabel": "State",
"picklistFilterValues": [
{
"label": "State *"
},
{
"label": "Alabama",
"value": "Alabama"
},
{
"label": "Alaska",
"value": "Alaska"
},
{
"label": "Arizona",
"value": "Arizona"
},
{
"label": "Arkansas",
"value": "Arkansas"
},
{
"label": "Armed Forces Americas",
"value": "Armed Forces Americas"
},
{
"label": "Armed Forces Pacific",
"value": "Armed Forces Pacific"
},
{
"label": "Armed Forces",
"value": "Armed Forces"
},
{
"label": "California",
"value": "California"
},
{
"label": "Colorado",
"value": "Colorado"
},
{
"label": "Connecticut",
"value": "Connecticut"
},
{
"label": "Delaware",
"value": "Delaware"
},
{
"label": "Florida",
"value": "Florida"
},
{
"label": "Georgia",
"value": "Georgia"
},
{
"label": "Hawaii",
"value": "Hawaii"
},
{
"label": "Idaho",
"value": "Idaho"
},
{
"label": "Illinois",
"value": "Illinois"
},
{
"label": "Indiana",
"value": "Indiana"
},
{
"label": "Iowa",
"value": "Iowa"
},
{
"label": "New Mexico",
"value": "New Mexico"
},
{
"label": "New York",
"value": "New York"
},
{
"label": "North Carolina",
"value": "North Carolina"
},
{
"label": "North Dakota",
"value": "North Dakota"
},
{
"label": "Ohio",
"value": "Ohio"
},
{
"label": "Oklahoma",
"value": "Oklahoma"
},
{
"label": "Oregon",
"value": "Oregon"
},
{
"label": "Pennsylvania",
"value": "Pennsylvania"
},
{
"label": "Rhode Island",
"value": "Rhode Island"
},
]
}
]
}
It's "alwaysShow"
, not "show"
.
Doesn't "show" create the Visibility Rule in the first place? "alwaysShow" would remove it.
I only got it to work by following the documentation exactly and that includes placing the payload as "x-www-form-urlencoded" in Postman: