# Changing parameter constraints

**URL:** <https://rossvideo.community/t/changing-parameter-constraints/12138>\
**Category:** Automation & Control\
**Created:** [February 21, 2015, 7:53pm UTC](https://rossvideo.community/t/changing-parameter-constraints/12138 "2015-02-21T19:53:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kennethdammyr](https://rossvideo.community/letter_avatar_proxy/v4/letter/k/4491bb/32.png) [@kennethdammyr](https://rossvideo.community/u/kennethdammyr)\
**Post date:** [February 21, 2015, 7:53pm UTC](https://rossvideo.community/t/changing-parameter-constraints/12138/1 "2015-02-21T19:53:00Z")

</div>

Hi!

I have a string-parameter with X constraints. The constraints are to by updated by an external API-call. The following code does not work:

var myArray = [“Coice A”, “Choice B”, “Choice C”]; // Dummydata

var constraints = params.createIntChoiceConstraint(myArray);

params.replaceConstraint (0x8, constraints); // 0x8 is the OID of my parameter  
What am I doing wrong+

---

<div class="post-metadata">

**Author:** ![jamespeltzer](https://rossvideo.community/user_avatar/rossvideo.community/jamespeltzer/32/50_2.png) [@jamespeltzer](https://rossvideo.community/u/jamespeltzer)\
**Post date:** [February 23, 2015, 8:03pm UTC](https://rossvideo.community/t/changing-parameter-constraints/12138/2 "2015-02-23T20:03:00Z")

</div>

Hi Kenneth.

createIntChoiceConstraint only works with INT16, INT16\_ARRAY, INT32, and INT32\_ARRAY parameters. They won’t work with STRING and STRING\_ARRAY.

If you are choosing from a fixed list, then you should be able to get what you want by changing parameter 0x8 to an integer parameter. You can still get the string value out of the parameter with params.getStrValue(0x8, 0); in ogScript (the string value is also passed to XPression).

If you need the list to be editable, there are ways in DashBoard 6.x to change between different StringChoiceConstraints but no way to create new ones at runtime (there is in DashBoard 7 - available as a beta. Just not in 6.x)

[#DashBoard](https://livinglive.community/search?s=tags%3A%22DashBoard%22&executesearch=true)
