modifying a search programatically

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

modifying a search programatically

Postby faheemhameed » Thu Oct 05, 2006 9:47 am

After performing a search which results in no records found.
Then I want to re-enter find mode and reload whatever texts were entered in the previous search.

I would like this feature be added.

Thanks!
Hameed
Pilot simple software
Hong Kong
User avatar
faheemhameed
 
Posts: 763
Joined: Wed Sep 10, 2003 7:23 am

Postby bcusick » Thu Oct 26, 2006 12:09 pm

Can do this in 3.0.
Bob Cusick
bcusick
 
Posts: 1255
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA

Postby faheemhameed » Thu Oct 26, 2006 12:50 pm

can you please give me a quick snippet?

Thanks!
Hameed
Pilot simple software
Hong Kong
User avatar
faheemhameed
 
Posts: 763
Joined: Wed Sep 10, 2003 7:23 am

Postby Riccardino » Thu Oct 26, 2006 1:11 pm

faheemhameed wrote:can you please give me a quick snippet?

Thanks!


http://www.servoymagazine.com/home/2006 ... hes_w.html
ciao, ric
User avatar
Riccardino
 
Posts: 911
Joined: Thu Apr 24, 2003 11:42 am
Location: Ferrara, Italy

Postby faheemhameed » Thu Oct 26, 2006 1:39 pm

What I was looking is to remember what the user entered in find mode.
If search failed I want the system to re-enter what the user entered in the find mode so that the user can modify the previously entered criteria and work on.
Hameed
Pilot simple software
Hong Kong
User avatar
faheemhameed
 
Posts: 763
Joined: Wed Sep 10, 2003 7:23 am

Postby ROCLASI » Thu Oct 26, 2006 1:52 pm

Hi Hameed,

You can only achieve this by retrieving the filled in data just before the find and store that in some global array.
Then when you want to redo the find you can fill in all the fields in your find screen with the data stored in that array.

I.e. you have to code this functionality yourself.
I have done it this way before on a project where they wanted to have their searches (the criteria, not the foundset) saved.


Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Postby faheemhameed » Fri Oct 27, 2006 5:05 am

Thanks for your advice.

Can I do this without naming each and every fields in the layout?

I do want to spend time on naming a lots of fields in a lots of layouts.

How did you do that?

I want it to make it simple that after I have written this global script it works for all layouts.

Thanks!
Hameed
Pilot simple software
Hong Kong
User avatar
faheemhameed
 
Posts: 763
Joined: Wed Sep 10, 2003 7:23 am

Postby ROCLASI » Fri Oct 27, 2006 8:49 am

The easiest (code wise) is to use named field objects where you can grab all named form objects and get/set the data.
Else you have to use the dataprovider names. But probably not all dataproviders are on your form(s).
In that case you need to use an array with the dataprovider names where you get/set the data.

It's a bit of a work but it's doable.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 8 guests

cron