cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

How to fetch date wise records

PriyankaDhangar
8-Gravel

How to fetch date wise records

I have data in the JSON format.

I want to display records of the selected date and time on mashup for that, I have taken time selector widgets.

How can I fetch the data using the Time selector widget and how to display the result?

what service should be written?

how to use the time selector widget? Is there any other way to do the same?

 

  

 

ACCEPTED SOLUTION

Accepted Solutions

I'm a little uncertain, so I'll just state what I know.

The query you are executing as shown will take your initial infotable and produce a new one with the query applied.

I assume that will need to be your Service output of type infotable with the appropriate datashape assigned.

After that you can take the service map it to your mashup and display the output in let's say a grid.

 

Will this allow you to display all three shifts, I'm not sure because I don't know what your data looks like. Could it? Most likely, but you need to consider how users want to use the information and how to then display it, accordingly your services need to be created.

View solution in original post

5 REPLIES 5

My guess is that you want data for a time range if you are using a time selector.

In a service

You'll have to convert your JSON data into at least an InfoTable first

Then you can apply the time ranges to it as a filter/query

That service is mapped to your mashup map in your input parameters from the time selector widget return result goes to your grid/chart

Hello @PaiChung,

Thanks for your response,

I have converted JSON data into InfoTable.

I am taking input from the time selector and given as an input to my query filter as following:

// Provide your filter using the format as described in the help topic "Query Parameter for Query Services"
var query1 = {
"filters": {
"type": "AND",
"filters": [{
"fieldName": "timestamp",
"type": "BETWEEN",
"to": StartDate,
"from": Enddate } ] } };

 

So I need to give any service/conditions or I can directly pass this query to the infoTable?

I want to display shift wise records there are 3 shifts, do I need to use a time selector for that?

 

Regards,

Priyanka

I'm a little uncertain, so I'll just state what I know.

The query you are executing as shown will take your initial infotable and produce a new one with the query applied.

I assume that will need to be your Service output of type infotable with the appropriate datashape assigned.

After that you can take the service map it to your mashup and display the output in let's say a grid.

 

Will this allow you to display all three shifts, I'm not sure because I don't know what your data looks like. Could it? Most likely, but you need to consider how users want to use the information and how to then display it, accordingly your services need to be created.

Hi @PriyankaDhangar.

 

If you are satisfied with the previous response, please mark it as the Accepted Solution for the benefit of others with the same question.

 

Thank you for your participation in our community!

 

Regards.

 

--Sharon

slangley
23-Emerald II
(To:slangley)

Hi @PriyankaDhangar.

 

If you feel your question has now been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Announcements


Top Tags