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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Searching for entry in Advanced Grid

tlichtenberger-
1-Visitor

Searching for entry in Advanced Grid

Hey there,

I have an advanced grid filled with data in my mashup and what I want to do is to find a specific entry in that grid. The data the grid is filled with is not based on a data table, but on multiple instances of a ThingTemplate. I have already ticked the EnableGridSearch property and positioned the searchbox in the mashup.

But I do not know how to operate with the QueryFilter-property.

I have already read the Advanced Grid User Guide but it does not really help me to implement it because I am not familiar with the query parameter and query services at all.

My grid looks like this at the moment and want to search for a specific AC Tag:

If anyone has already worked with the advanced grid widget I would be so grateful if you could explain it to me!

Thank you so much in advance

Theresa~

ACCEPTED SOLUTION

Accepted Solutions

Hi Theresa Lichtenberger​,

The service feeding the Advanced Grid should have query parameter for Search function to work. So, first add a query input parameter of DataType query in your custom service.

Then update the Service to apply this query on the current infotable output.

Let's say result1 is our final infotable currently. Add following code to apply the query:

var params = {

    t: result1 /* INFOTABLE */,

    query: query /* QUERY */

};

// result: INFOTABLE

var result = Resources["InfoTableFunctions"].Query(params);

Now bind the QueryFilter property of Advanced Grid with input query parameter of the custom service.

Also, bind the Filter event of Advanced Grid with the custom service.

Then try filtering.

I hope it helps.

View solution in original post

6 REPLIES 6

Hi Theresa Lichtenberger​,

The service feeding the Advanced Grid should have query parameter for Search function to work. So, first add a query input parameter of DataType query in your custom service.

Then update the Service to apply this query on the current infotable output.

Let's say result1 is our final infotable currently. Add following code to apply the query:

var params = {

    t: result1 /* INFOTABLE */,

    query: query /* QUERY */

};

// result: INFOTABLE

var result = Resources["InfoTableFunctions"].Query(params);

Now bind the QueryFilter property of Advanced Grid with input query parameter of the custom service.

Also, bind the Filter event of Advanced Grid with the custom service.

Then try filtering.

I hope it helps.

hey Ankit Gupta​,

thank you so much for your answer!

I do have one more question though concerning the infotable and the output of the service.

As you suggested, I have created a custom service like this:

As far as I understand, the infotable represents the columnstructure (or data structure) of the grid, doesn´t it?

If I have to return an infotable... with what exactly do I have to bind the output-infotable of the service with?

Where does the service get the definition of the infotable? Does it get it from the Out-going-QueryFilter-property (which is a query datatype?)

And when do I need the "in-going"-binding-Arrow of the QueryFilter-property?

I hope my questions are not confusing you! But I think I haven't fully understood it yet.

So far, thank you so much, your help is very much appreciated!

Theresa~

Hi Theresa Lichtenberger​,

I was actually suggesting you to update your custom service and add the code at the bottom.

I have attached my entities here; please check and let me know if you face any issue.

I hope it helps.

Hi Theresa Lichtenberger​,

Is this issue resolved?

Thanks,

Ankit Gupta

Good morning Ankit Gupta​,

It finally works! The files you uploaded really helped me out in finding the last pieces I have missed.

Thank you so much for your help

Theresa~

Good morning Theresa Lichtenberger

I am Glad it helped.

Announcements


Top Tags