Reusing advanced query

Reusing advanced query

  
Hi guys.

This is my first post on community. Sorry, for my noob question :)

Would it be possible to reuse Advanced Query on the platform? My need is about a somewhat complex query, I'd like to use it in different situations.

I've tried to create a user function with this Query, populating a return list. In this way, I was able to reuse the query. However, after instantiating the function in the preparation, I can't refresh the return list query.

Is there any other way to do this?
Breno Nico wrote:
Hi guys.

This is my first post on community. Sorry, for my noob question :)

Would it be possible to reuse Advanced Query on the platform? My need is about a somewhat complex query, I'd like to use it in different situations.

I've tried to create a user function with this Query, populating a return list. In this way, I was able to reuse the query. However, after instantiating the function in the preparation, I can't refresh the return list query.

Is there any other way to do this?
 
Hi Breno.
You must use a record list to populate the component. By doing this all you need to do is call the function with the advanced query and assign the return values to the record list.
You must call the function and assign the values every time you want to refresh the values.

PS: If you only need it on one screen, you can simply use the query on the preparation and use the "Refresh Query" component everytime you need to refresh the query.

Regards
Rodrigo Henriques