search: perform, select, put in another table

Could someone help me?

I have a Form[sales] using table sales.
In this Form i have field client.
The problem is that from this form
i want :
1.) Perform a %text% search in another
table named clients to wiew all clients
that match the text_search

2.) From the wiew select one client
to put it in the field client of Form
sales.

Tanks in advance
Gianni Pinna
cuoredisardegna@tiscali.it

cuoredisardegna@tiscali.i:
Could someone help me?

I have a Form[sales] using table sales.
In this Form i have field client.
The problem is that from this form
i want :
1.) Perform a %text% search in another
table named clients to wiew all clients
that match the text_search

2.) From the wiew select one client
to put it in the field client of Form
sales.

Ciao, Gianni

I use this method:
I create a form, based on table “customers”, where I show all the search result in a list view (let’s call it “elenco_clienti”);
I put a global field on the header of this form (let’s call it “cercaclienti”)
I write a method like this:

controller.find()
company ="#%"+globals.cercaclienti+"%"
controller.search()

If you want to warn the user if your search fails, you can add:

if(controller.getMaxRecordIndex()== 0)
{
	plugins.dialogs.showDialog('Ricerca','La ricerca effettuata non ha dato nessun risultato','OK')
	controller.loadAllRecords()

}

Save the method, select the field “cercaclienti” in Developer Mode and set the option OnAction to execute the method you’ve just saved (this way, you can start the search simply hitting the ENTER key)
After that, move to your Sales form, place a tabpanel and choose to show records from “elenco_clienti”

This should work (unless I forgot something :wink:

If you want to see an excellent implementation of this technique, I suggest you take a look to:
http://www.mattstemplates.com/videos/RapidSearch.mov

Buon lavoro :D

Buon lavoro
Dear Riccardino,

i received your prompt reply.
I am starting in working with docylity to Yours specifications.
I hope that you will find in your problems persons kind with you as you have wonted be with me.

Tanks with best regards

Gianni Pinna