Facility Control

 View Only
  • 1.  Changing Int-32 Choice Constraints

    Posted 10-01-2015 23:28

    Hello,

    I'm working on a panel for a volleyball game where I'd like to change the names on a choice constraint based on another value (team tricode). I have a choice constraint that currently has the values 1=Home, 2=Vis and I'd like Home/Vis to be replaced by the tricode. I've tried to look this up in the ogScript documentation but I'm not able to find a whole lot of information. Here's my code:

    var tricode = params.getValue('Vis_Tricode', 0);

    params.replaceConstraint('Ply_Team_01', tricode);

    params.replaceIdentifiedConstraint(2, tricode);

    Running Dashboard Version 8.0.0 | 2015-09-30 T13:34

    Any help is greatly appreciated.



  • 2.  RE: Changing Int-32 Choice Constraints

    Posted 10-05-2015 14:05

    Hi Rob.

    You need to create the new constraint and then you can do the update.

    `var constraintValues = [];

    constraintValues[0] = params.getValue('Vis_Tricode', 0);

    constraintValues[1] = params.getValue('Home_Tricode', 0); //Just making an assumption here

    var newConstraint = params.createIntChoiceConstraint(constraintValues);//This must be an array

    params.replaceConstraint([oid of the parameter with the choice constraint], newConstraint);`

    #DashBoard