How to refresh a list periodically?

0
Hi, I have the RGraph Gauge and want it to be refreshed periodically to always show the current value. Therefore I created a Microflow with sorting a list with decending order to always have the earliest value on top, then taking the head, afterwards a Change Object Activity to get it refreshed … but doesn’t work. Idea is based on the MindSphere Learning Path to implement the vector gauge. Actual now the vector gauge takes the initial value – and that’s it. Any idea to get the vector gauge run with current values? Best regards Gerd Mendix Version 8.2.2
asked
4 answers
3

You want it to update itself periodically? How do you achieve the thing with the period. The Microflow itself is usually executed only once. Is your microflow a datasource microflow for your graph?

A periodic self refresh can be done in a TemplateGrid with refresh set to some seconds. Or you could use microflow timer to trigger it over and over again.

answered
1

You could try using the Microflow Timer widget on the page. Set it to run every 60000ms or so, and have it retrieve the objects using the same data source as your page, and refresh them.

https://appstore.home.mendix.com/link/app/27/

I’ve started using it recently after a colleague showed me how powerful it can be, it’s really useful!

answered
0

That’s the result with the Microflow TImer widget:

Could it be that the MicroflowTimer expects a Boolean as return type according to an error message in the errors list? (I have an object with some decimals attributes as return type of the Microflow) Can it really be placed somewhere inside the corresponding data view because there is no nesting functionality?

answered
0

When nesting the vector gauge with a template grid, I get an error message that seems to show, that the template grid cannot update the RGraph Gauge:

“Tutorial.Home.templateGrid1: Error while applying context Error: Tutorial.Home.rGraphGauge1: Error while applying context Error: Tutorial.Home.rGraphGauge1: Error while applying context TypeError: Cannot use 'in' operator to search for 'unsubscribe' in undefined Error: Tutorial.Home.templateGrid1: Error while applying context Error: Tutorial.Home.rGraphGauge1: Error while applying context Error: Tutorial.Home.rGraphGauge1: Error while applying context TypeError: Cannot use 'in' operator to search for 'unsubscribe' in undefined
    at http://localhost:8080/mxclientsystem/mxui/mxui.js?637075134762064778:40:13698
    at Object.t.collect (http://localhost:8080/mxclientsystem/mxui/mxui.js?637075134762064778:35:64950)
    at Object.e.exports.applyContext (http://localhost:8080/mxclientsystem/mxui/mxui.js?637075134762064778:40:13596)
    at E.<computed>.S.passContext (http://localhost:8080/mxclientsystem/mxui/mxui.js?637075134762064778:35:86534)
    at E.<computed>.S.applyContext (http://localhost:8080/mxclientsystem/mxui/mxui.js?637075134762064778:35:86419)
    at E.<computed>.S.<anonymous> (http://localhost:8080/mxclientsystem/mxui/mxui.js?637075134762064778:5:26974)
    at Object.t.collect (http://localhost:8080/mxclientsystem/mxui/mxui.js?637075134762064778:35:64950)
    at http://localhost:8080/mxclientsystem/mxui/mxui.js?637075134762064778:73:107329
    at a (http://localhost:8080/mxclientsystem/mxui/mxui.js?637075134762064778:35:64889)
    at Object.t.collect (http://localhost:8080/mxclientsystem/mxui/mxui.js?637075134762064778:35:65070)”

answered