Query FORCE minimum length input

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
ab042
Posts: 326
Joined: Mon Jul 17, 2006 4:11 am

Query FORCE minimum length input

Post by ab042 »

Is it possible to set the QUERY so that the user MUST input something in a search field or maybe set a MINIMUM LENGTH on each SEARCH field.

For example, we have a query that has TWO fields. One for LAST NAME and one for Month.

Currently if the users input nothing and hits the SEARCH button they get EVERY RECORD in the FILE. Hundreds of thousands of them.

If we could place a minimum length on the NAME FIELD at least it would force them to put something in and restrict them from see everything and in doing so SAVE COMPUTING POWER from displaying and setting up a page that has thousands of records.
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

First of all Aware IM will NEVER display or execute a query that goes through thousands of records. It will automatically limit the query to 20 records at a time (or whatever number you indicate in "display items per page").

There is also a way to set minimum length, force the value to be entered etc. You need to define a non-persisted object that would have the attributes that the user would search for. You can then set whatever rules you like for this object - for example, force some attribute to be non-blank. Then you would need to define a process that would look something like this:

ENTER NEW TempObject
DISPLAY ObjectToSearch WHERE ObjectToSearch.Attr1 = TempObject.Attr1 etc

The only problem is that there is currently a bug in Aware IM that prevents queries to use values of temporary objects as described above. We are now looking at this bug and we will post a message on this forum when it is fixed.
Aware IM Support Team
ab042
Posts: 326
Joined: Mon Jul 17, 2006 4:11 am

Post by ab042 »

If the logic is suppose to limit the TOTAL RECORDS its not working on our system. It is limiting the number of records per page. But there are a lot of pages.

I assume maybe incorrectly so that it must be looking at all the records for the search and setting up the number of pages to be displayed because that is a correct number of pages based on 20 records per page.

As for the logic about limiting that should work fine and thanks for it. Please post a message when you have it fixed.

If its possible to fix it in the next month or so it would be helpful to us.

Thanks again,
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

It runs a separate query that finds out the total number of records first and this is why the number of pages is correct. This is very fast under MySQL. Then it limits the query and gets the first n records.

The fix will hopefully be available within days, if not tomorrow.
Aware IM Support Team
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

The fix is available starting from build 868
Aware IM Support Team
Post Reply