1 Reply Latest reply on Jan 15, 2018 10:48 AM by supandey RSS
    bmaxted Newbie

    Set min/max for slider widget from data table

    Hi, I'm new to Thingworx and am hitting an issue converting data types.


    On my mashup I've got a Slider widget, and would like to set the Maximum and Minimum values based on the minimum and maximum values of data within a column of a Data Table.


    In my mashup I can use the Aggregate service to get a 1x1 InfoTable containing either the minimum or maximum value, but am not sure how to get the integer value out of the InfoTable to bind it to the Maximum and Minimum fields of the Slider Widget. Do I need to develop my own Service to do that?

      • Re: Set min/max for slider widget from data table
        supandey Ninja

        Hi Benton, if you have multiple rows in that Infotable and if you are looking to fetch e.g. the min value of all you'd want to write your custom query which will basically loop through and fetch the required value; you can use this OOTB snippet for looping over the Infotable


        var tableLength = yourInfotableHere.rows.length;
        for (var x = 0; x < tableLength; x++) {
        var row = yourInfotableHere.rows[x];
        //Your code here





        Additional link : What is an InfoTable?