How can I render My Graph according to the slider value ?
Question

My graph is rendered according to aggregate . for graph I used inbuilt widget and for slider too. 

Solution

The error is happening because the start and end are empty.

You need to set a default value or include a condition to execute the filter only when the values are not empty.

If(start <> 0, "Filter Condition", True)

Hi Pratik,

are you using Reactive or Web Traditional?

The slider have an event when a value changes. In that event you can refresh the aggregate. If you're with Web Traditional you just need to refresh the container to render the graph again.

Regards

I am using  Reactive . 

you just need to use the Refresh Data widget then on your aggregate

Do I need to use filter on my aggregate before refresh data ?  

If you are you filtering the aggregate with the slider value, yes.

Use the slider variables to filter.

Yes I want to render my graph according to my slider value . I add a filter in my aggregate  but I got the error about data type. so the slider gives a decimal value and column in my aggregate on which I have a filter has a data type of Time . so I had a javascript widget in my flow and converted the slider value into instance of Date and passed it in outputparameter which is assign to a local variable . now filter doesnt give any error . so after adding filter . I added refresh data in my flow . 

in the filter aggregate, you can convert the decimal to time by using the function NewTime(DecimalToInteger(SliderValue), 0, 0)

I add the above function in filter . I was not getting slider variables in filter so I assigned them to local variable which were visible in filter expression tab . as I have two local variable for slider startinteval and emdinterval . my filter looks like this [valuefromcloum >= localVariableforstartinterval  or valuefromcolumn <= localVariableforendinterval ]. I want a filter so that I get values in between my startinterval and endinterval also including startinterval and endinterval .I used OR because when I used AND in the filter the graph doesnt render when the application starts . now I am getting a error message which says Error Executing Query .


I am new to outsystems . kindly help me

Send a screenshot of the aggregate filters

Solution

The error is happening because the start and end are empty.

You need to set a default value or include a condition to execute the filter only when the values are not empty.

If(start <> 0, "Filter Condition", True)

Great! Please mark the answer as solution. Thanks.

sure aslo can you please help me with something else too ?

so I have to add two sliders . first one will set start time and second one will set end time . so when start time one works nicely but when I set  end time value it doesn't work properly . sometimes it doesn't work at all . can you please help me with this ?  

I used that too but I am facing same issue. 

It's hard to guess the problem without more details.

Debug it so you can find the values of the variables at each point and why they are not working as expected.

You need to use a single filter, not two.

When you move the slider the first time, only one value changes, the other stays null. Add the code in red and remove the other filter.

If(start <> 0 and end <> o, GraphicalDatum.DeliverTime >= NewTime(DecimalToInteger(start), 0, 0) or GraphicalDatum.DeliverTime <= NewTime(DecimalToInteger(end), 0, 0), True) 

Thank you so much for helping me . I am new to outsystems and was confused . you helped me and guided me  . Thank you 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.