Stringlist parementer

Hi,

I have an object in my model of type StringList with the choices: [“Full Lenght”, “Half Lenght”, “First Met Cut Out”, “First Ray Cut Out”, “Morton’s Extension”]

Im not sure how to update my model with parameter of this type. I tried to intert string list, or even an index, since default values is 0.

But it always return a parameter error.

My trys:

api.parameters.updateAsync({name: “List”, value: [“Full Lenght”, “Half Lenght”, “First Met Cut Out”, “First Ray Cut Out”, “Morton’s Extension”]}).then(
function(response) {
console.log(“responselist”, response);
}
);

and

api.parameters.updateAsync({name: “List”, value:0}).then(
function(response) {
console.log(“responselist”, response);
}
);

The correct way is to use the index, like in the second example of your message.

I tried it in your model (with the parameter called ‘Insole Model’) and it worked fine:

api.parameters.updateAsync({name: 'Insole Model', value:1}).then(function(response) {console.log('responselist', response);});

When I copy-pasted your call, I had those issues:

  • The name of the parameter (it’s not called ‘List’, but ‘Insole Model’) but I guess you changed it for the example.
  • Your double-quotes were not working for me, not sure how you formatted them. I replaced them with single quotes
  • If you give the function the current value of the parameter (in your example, if the index is already set to 0 before you call the function), then it will abort and not do any update of course.

Let me know if that solved your issue.

I was using the previous model, so I had List as parameter, but the problem was in the model, was not working. Now it works with the latest model.
Thank you.