time range for time series widget

0
Hello everyone, I am building an app for Siemens Mindsphere.   I am using a Microflow in which I am doing a REST-Call. In the REST-Call I apply an import mapping. The microflow returns a list of the object which you can see in the last photo. I am using a time series widget to display the data (list of the object).    I want that the user of the application can choose two dates and then the time series widget should display the data between these two dates. Can somebody help me how to do that? I already saw something similiar in the Pump example app but didn’t unterstand how this works. Or can I use the “date picker” widget  somehow? I added photo from the current time series, the microflow and the object.    best regards!
asked
7 answers
0

After the Rest-call:

  • determine the earliest and the latest datetime,
  • feed this $TimeSeriesDataList to a page,
  • create a helper object having attributes startdate and enddate

and when the user has filled the start and enddate (which you only allow to be between earliest and latest datetimes that you determined:

  • create a $TimeSeriesDatalist constained by those start- and enddate
  • feed the constrained list to the widget.
answered
0

Hello Tim,

thanks for your help. Hhow can the how can I determine the earliest and the latest datetime?

And how can the user fill out the time range?

Sorry, I am really new with mendix,

 

best regards

answered
0

Can anyone please help?

answered
0

 

First of all - is your question considering two fields only displaying for the User Selection ? for Example "Date 1" and "Date 2" - if so, you can just let the user make the selection using DateTime widget and then use that input to determine which one is the earliest date. - you can just do that by comparing in Microflow Date1 > Date 2 or vice versa.

answered
0

Hello Yonas,

 

yes, I want that the user select the two dates. And then the time series widget should display the time between these the dates.
But how do I get these dates into my microflow?

Sorry, I am really a beginner..

answered
0

I added the datetime picker. As data source I use the an attribute from the entitity which fills the dataview. But the value of the attribute doesn’t change after i entered a date in the date picker. Can you explain me, how to change the objects value after I entered the time?

Furthermore, I always get the following error?

I also tested it with other time picker widgets but always the same error. That means I can’t use UI-actions?  But why isn’t it possible? 

answered
0

Maybe it is easier for you when I am showing you my Microflows, the domain model and my page:

The first picture shows my domain model which has the two entities AppContext and TimeSeriesData. 
On my page, I use time series widget to display data from Mindsphere Assets. Therefore I use the second Microflow which has the AppContext as a Input. Now I want that the user can pick two dates and the time series widget has to display the data between these two dates. 

I think I have to add some attributes to the entity AppContext which the user can change via the datetime picker.
I tried a few things but nothing really works..

 

 

answered