How would I create a guage based on Conditions - Forum - Rollbase - Progress Community

How would I create a guage based on Conditions

 Forum

How would I create a guage based on Conditions

  • I'm showing a guage with total number of records this way "return rbv_api.getCount(62898098);"

    But I would like to show the count based on only some specific location which is based on LOCATION ID 

    That means if my total records value based on "return rbv_api.getCount(62898098);"  = 100 Records and my Guage must show  based on locations  ( A + B + Y + Z + X) = 15

    Kindly let me know, if I have to write a nested conditions or the SQL 

  • anyone to help in here please

  • Hi mysterymins, I'm sure someone will get back to you on Monday...

  • In one gauge?  I think that's more a chart (or a very custom gauge with multiple dials in different colors).

    However, if it's a set of gauges, one for each location, then a Query should more than capable to provide that with a different Query for each gauge.

    Or if you want one gauge for the sum of locations (compared to the total), also a Query.

    A Query to give you totals by location just needs a Group By add-on to Select Count().  But that's where a Chart makes more sense.  It's designed to handle the type of display for multiple locations,

  • well i would want to have it one guage where it shows in single information

    This guage would show the value which is single value  - I would want a single sum of location

  • Hi mysteryminds,

    The correct syntax for getCount is rbv_api.getCount(viewId, filterName, filterValue)

    try to use something like this:

    return Number(rbv_api.getCount('your viewer id', 'location', 'A')) +

    Number(rbv_api.getCount('your viewer id', 'location', 'B')) +

    Number(rbv_api.getCount('your viewer id', 'location', 'X')) +

    Number(rbv_api.getCount('your viewer id', 'location', 'Y')) +

    Number(rbv_api.getCount('your viewer id', 'location', 'Z'));

    Or you can use

    rbv_api.selectQuery("SELECT count(*)  FROM <your table> WHERE location IN ('A','B','C','X','Y','Z')", 1)

  • thanks a ton Ricardo... works like charm ...

  • Ricardo one simple question in here how do i link the view to show the same amount of data in drill down

  • Hi mysteryminds,
     
    You need to clone the viewer used to show records in your gauge.
     
    In the new viewer:

    -      Check the option “Hide count of total records for this view”.

    -      Change viewer to run formula instead of using the 5 available filter fields.

     
    As “location” is a Related Field (in your case), you need to create a formula like this:
     
    TL0.LOCATION_ID IN ('A','B','C','D','X', 'Y','Z')
     
    Please let me know if it works for you.
     
    Regards,
    Ricardo
     
     
     
    From: mysteryminds [mailto:bounce-ksunilallwesterncom@community.progress.com]
    Sent: Monday, March 09, 2015 8:18 PM
    To: TU.Rollbase@community.progress.com
    Subject: RE: [Technical Users - Rollbase] How would I create a guage based on Conditions
     
    Reply by mysteryminds

    Ricardo one simple question in here how do i link the view to show the same amount of data in drill down

    Stop receiving emails on this subject.

    Flag this post as spam/abuse.

  • Thanks a ton Ricardo.... you are magician and it stunningly works..... just that the count is not working...

  • Hi mysteryminds,
     
    I’m sorry, but the only way to make it happen is hiding the count of total records.
     
    Regards,
    Ricardo
     
     
    From: mysteryminds [mailto:bounce-ksunilallwesterncom@community.progress.com]
    Sent: Thursday, March 12, 2015 2:40 PM
    To: TU.Rollbase@community.progress.com
    Subject: RE: [Technical Users - Rollbase] How would I create a guage based on Conditions
     
    Reply by mysteryminds

    Thanks a ton Ricardo.... you are magician and it stunningly works..... just that the count is not working...

    Stop receiving emails on this subject.

    Flag this post as spam/abuse.