SysQyeryForm

Hi ,

Can anyone tell me the reason ,why we get the same value of the criteria that we used in some class and

if we are using the same query in different class i.e if we select "previously used query "

from drop down in select query we will get the criteria used before … reason please???

thanks in advance[:)]

Issue:
We have two classes using dynamic queries each of them and having same data source.
Then if we set criteria for first class’s query and if we open the second class, we will see the criteria used for the first class under the option “Previously Used Query” instead showing the criteria related to second class.

Reason:
When we give a criteria for a query it will be save based on the name of the query.Since the dynamic queries that we created doesn’t have the name,the query’s criteria
is saved based on the datasource’s id. Since in the both cases the queries use the same data source,they will end up with the criteria used by other class every time we open with the option “Previously used Query”.

Solution:
We can solve this simply by “naming the queries” with our own names.And every time we need to open them we need to provide the name used before.Instead of our own names we can also give the class name as shown below.

queryrun.name(this.name());