Skip to main content
Known Participant
October 19, 2017
Question

Controlling Multistate Objects with Javascript

  • October 19, 2017
  • 1 reply
  • 400 views

I am looking for a method to control the view of a Multistate object with javascript code.

I have an object that has six views (call them one, two, three.... six)....

I want the user to hit a button and for a different object (not the button) to display one of the state views. This is something like I am thinking about.... but don't know if it is possible to control the state view of one object, by the user pressing a different button. Anybody have any thoughts here....

Something like this....

var setNumber = 1;

if (setNumber == 1) {

     window.cpAPIInterface.setVarialbleValue("Multistate_Object", one);

}

Thanks for any help or direction on this.

Regards,

Dave

    This topic has been closed for replies.

    1 reply

    Lilybiri
    Legend
    October 19, 2017

    Easy with advanced actions, but since you want JS, I'll step aside.

    Known Participant
    October 19, 2017

    yes, I can do it with the Advanced actions... However, it appears that the Advanced Actions have a major limitation of single IF - ELSE clause functionality... I am trying to trigger a spinner for six different numbers.... This works perfectly for only doing ONE.... nothing more.  Just trying to get it to do an if else multiple times....

    Lilybiri
    Legend
    October 19, 2017

    You seem to ignore the power of advanced actions. You can combine as many

    decisions, each with IF or eventually ELSE in one action.