assurance-tunnel
assurance-tunnel
assurance-tunnel
assurance-tunnel

JavaScript - Output that is mutated on 'range' type


  • Beta Platinum

    Hi there, 


    As some of you know Isadora has different type's of data that a Input / Output can be, for example an Text, Interger, Float, etc. 

    We also have the 'range' type that is typically used for things like a Note on watcher. 

    I tried all possible solutions but I could not figure out how to set the range type to the desired value using the JavaScript actor and it is currently blocking work for a client.

    I attached a simple repro file.

    Tagging some JavaScript peeps :) @DusX @GertjanB


  • Beta Platinum


  • Tech Staff

    The Javascript actor's input and output parameters are mutable, but I don't think it's currently possible to dynamically generate ranges. I can certainly see that we need to be able to dynamically generate ranges, so I'll put that in as a feature request.

    Here's a bit of a workaround for now though: EXAMPLE FILE

    Since a Selector can store a range, you can manually input all your desired ranges into a Selector actor and then change the "select" input as a clunky way of dynamically changing a numerical range. I will say that this workaround is kind of a nightmare when you work with large ranges because you have to manually type each possible permutation into the Selector one input at a time. Likewise, if you make a mistake while typing the permutations, it'll screw with the logic you're going to need to program to get the right Selector input based on the start and end numbers in the desired range. 


    I made a User Actor that accepts the start and end numbers of a range using integers between 1 and 16. It has limitations, such as it can't deal with a range where the first number is larger than the second, (that'd necessitate more logic than I programmed and it would mean needing to expand the number of selector inputs to allow for those ranges, but I didn't feel like retyping all of them so I just called this workaround good enough for now).

    Best wishes,

    Woland


  • Beta Platinum

    @Woland

    Thanks ! Workable for now, but indeed it becomes a bit stupid when we have a greater range.


  • Tech Staff

    @Juriaan said:

    Workable for now, but indeed it becomes a bit stupid when we have a greater range.

     Yeah...

    The range data type is really weird and a pain in the but to try to change dynamically.


Log in to reply