dbTalk Databases Forums  

Again trying for a script search solution.

comp.databases.filemaker comp.databases.filemaker


Discuss Again trying for a script search solution. in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Léon Obers
 
Posts: n/a

Default Again trying for a script search solution. - 06-01-2005 , 02:57 PM






FM 7v3 - Windows.

Hello,
Some days ago I ask a way to translate general known programming steps
into typical Filemaker script language steps. No reaction.

I shall ask in another way my difficulties. So I hope I get a solution.


1.
In a search script you can fill in any text that it has to find.
But I want that it uses the content of a field of a record of a related
file foor this search text. How can I implement the content of a field
(only one record of a related table) into the search text string within
a script?

2. When a field is empty (of the script 1. step above), how can I make
the search script step let deny further action. So I don't get error
messages that it can not find an "empty" field of the base used table?


Other message of two days ago with the subject:
"FM 7v3 Win - script designing"


--
Vr.groet - regards, Léon Obers

Reacties per mail, vervang "invalid" door "cc" in het adres.
Reactions by mail, exchange "invalid" by "cc" within address.


Reply With Quote
  #2  
Old   
audleman@quasika.net
 
Posts: n/a

Default Re: Again trying for a script search solution. - 06-02-2005 , 11:34 AM






These are common confusions with FM7. Here are your answers.

1. The 'Specify Found Request' dialog box isn't extremely useful, as
you can only input a set value. Instead, do the following in your
script:

Enter Find Mode[]
SetField[A, 'data']
PerformFind[]

2. You can check for an empty field with the IsEmpty() function. On the
other hand, you can use the 'Set Error Capture' script step 'on' to
hide any error message that might pop up if the user does a blank find.


Kevin


Reply With Quote
  #3  
Old   
Léon Obers
 
Posts: n/a

Default Re: Again trying for a script search solution. - 06-03-2005 , 02:19 AM





audleman (AT) quasika (DOT) net wrote:
Quote:
These are common confusions with FM7. Here are your answers.

1. The 'Specify Found Request' dialog box isn't extremely useful, as
you can only input a set value. Instead, do the following in your
script:

Enter Find Mode[]
SetField[A, 'data']
PerformFind[]
Thanks for the answer, but onfortunalety it is not the answer for my my
question. But looking your steps maybey you bring me to another thought,
I have to try later these days (less time now).

What I need is that the 'data' in your "SetField [A, 'data']" step is
taken from the contents of a field from a related table. The related
table do have only one record with base information for the entire database.
The related table is connected with use of the "X" mark
---------X-----------
so data is valid for every record in the related second "big" table with
many records.

The data for the search script has to be looked up in that particular
"one" record of the related base information field, and to be used for
searching into the second table.


Quote:
2. You can check for an empty field with the IsEmpty() function. On the
other hand, you can use the 'Set Error Capture' script step 'on' to
hide any error message that might pop up if the user does a blank find.
This seems to be a good option for using.

In a few days I let know my findings. Thanks for your input.



--
Vr.groet - regards, Léon Obers

Reacties per mail, vervang "invalid" door "cc" in het adres.
Reactions by mail, exchange "invalid" by "cc" within address.



Reply With Quote
  #4  
Old   
42
 
Posts: n/a

Default Re: Again trying for a script search solution. - 06-03-2005 , 12:05 PM



In article <d7p0ac$22u$1 (AT) news3 (DOT) zwoll1.ov.home.nl>,
mail.to.me (AT) fotograaf (DOT) invalid says...
Quote:

audleman (AT) quasika (DOT) net wrote:
These are common confusions with FM7. Here are your answers.

1. The 'Specify Found Request' dialog box isn't extremely useful, as
you can only input a set value. Instead, do the following in your
script:

Enter Find Mode[]
SetField[A, 'data']
PerformFind[]

Thanks for the answer, but onfortunalety it is not the answer for my my
question. But looking your steps maybey you bring me to another thought,
I have to try later these days (less time now).

What I need is that the 'data' in your "SetField [A, 'data']" step is
taken from the contents of a field from a related table. The related
table do have only one record with base information for the entire database.
The related table is connected with use of the "X" mark
---------X-----------
so data is valid for every record in the related second "big" table with
many records.

The data for the search script has to be looked up in that particular
"one" record of the related base information field, and to be used for
searching into the second table.
I fail to see why his solution won't work? Or is it because the
relationship to 'data' is broken while in find mode? If so, simply push
the 'data' into a global before going into find mode.




Reply With Quote
  #5  
Old   
Léon Obers
 
Posts: n/a

Default Re: Again trying for a script search solution. - 06-03-2005 , 09:56 PM





42 wrote:

Quote:
mail.to.me (AT) fotograaf (DOT) invalid says...

audleman (AT) quasika (DOT) net wrote:

These are common confusions with FM7. Here are your answers.

1. The 'Specify Found Request' dialog box isn't extremely useful, as
you can only input a set value. Instead, do the following in your
script:

Enter Find Mode[]
SetField[A, 'data']
PerformFind[]

Thanks for the answer, but onfortunalety it is not the answer for my my
question. But looking your steps maybey you bring me to another thought,
I have to try later these days (less time now).

What I need is that the 'data' in your "SetField [A, 'data']" step is
taken from the contents of a field from a related table. The related
table do have only one record with base information for the entire database.
The related table is connected with use of the "X" mark
---------X-----------
so data is valid for every record in the related second "big" table with
many records.

The data for the search script has to be looked up in that particular
"one" record of the related base information field, and to be used for
searching into the second table.

I fail to see why his solution won't work? Or is it because the
relationship to 'data' is broken while in find mode? If so, simply push
the 'data' into a global before going into find mode.
Sorry if my understanding is not as good.
That solution is searching for "data". That is not my problem.
The point is, how to get a copy of the contents of a field into the
search find "string" within a script, to do a search in the other table.

For practical use (scripts are more complecated to edit each time) I
don't want to fill in a search "text" within a scrip each time, because
I have to change many times the search criteria.
The solution I want to use is make use of a table where I can fill in
the search values.
Scripts has to look into that table, in such a way scripts pick up those
values, and use it in the search mode to another table.

I come back later (still not very much time these days).



--
Vr.groet - regards, Léon Obers

Reacties per mail, vervang "invalid" door "cc" in het adres.
Reactions by mail, exchange "invalid" by "cc" within address.



Reply With Quote
  #6  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: Again trying for a script search solution. - 06-04-2005 , 01:21 AM



You may create a global field GF, and show a layout with this field. The
user will then fill GF will the proper search data he wants. A button
nearby will launch the search script :
Enter Find Mode[]
SetField[A, GF]
PerformFind[]
Is this answering your question ?
Remi-Noel

"Léon Obers" <mail.to.me (AT) fotograaf (DOT) invalid> a écrit dans le message de
news: d7r58a$1im$1 (AT) news3 (DOT) zwoll1.ov.home.nl...
Quote:

42 wrote:

mail.to.me (AT) fotograaf (DOT) invalid says...

audleman (AT) quasika (DOT) net wrote:

These are common confusions with FM7. Here are your answers.

1. The 'Specify Found Request' dialog box isn't extremely useful, as
you can only input a set value. Instead, do the following in your
script:

Enter Find Mode[]
SetField[A, 'data']
PerformFind[]

Thanks for the answer, but onfortunalety it is not the answer for my
my question. But looking your steps maybey you bring me to another
thought, I have to try later these days (less time now).

What I need is that the 'data' in your "SetField [A, 'data']" step is
taken from the contents of a field from a related table. The related
table do have only one record with base information for the entire
database.
The related table is connected with use of the "X"
mark ---------X-----------
so data is valid for every record in the related second "big" table
with many records.

The data for the search script has to be looked up in that particular
"one" record of the related base information field, and to be used
for searching into the second table.

I fail to see why his solution won't work? Or is it because the
relationship to 'data' is broken while in find mode? If so, simply
push the 'data' into a global before going into find mode.

Sorry if my understanding is not as good.
That solution is searching for "data". That is not my problem.
The point is, how to get a copy of the contents of a field into the
search find "string" within a script, to do a search in the other
table.

For practical use (scripts are more complecated to edit each time) I
don't want to fill in a search "text" within a scrip each time,
because I have to change many times the search criteria.
The solution I want to use is make use of a table where I can fill in
the search values.
Scripts has to look into that table, in such a way scripts pick up
those values, and use it in the search mode to another table.

I come back later (still not very much time these days).



--
Vr.groet - regards, Léon Obers

Reacties per mail, vervang "invalid" door "cc" in het adres.
Reactions by mail, exchange "invalid" by "cc" within address.




Reply With Quote
  #7  
Old   
Léon Obers
 
Posts: n/a

Default Re: Again trying for a script search solution. - 06-04-2005 , 03:45 AM





Remi-Noel Menegaux wrote:

Quote:
You may create a global field GF, and show a layout with this field. The
user will then fill GF will the proper search data he wants. A button
nearby will launch the search script :
Enter Find Mode[]
SetField[A, GF]
PerformFind[]
Is this answering your question ?
Well, not exactly. But maybe we come close.
For each of my customers I make an own database file.
I want to change basic database settings for each of these customers
(schools --> I am a school photographer), once.

Those basic information like name of the school, adres, telephone etc.
is stored in one related table and in one record only.
The names of used classrooms has to be set only once too.

After that is done, the information is used within the other (related)
table about pupils etc. All basic information of the school is showing
up in the other table for each record, by the ----X---- relation that is
used.

Search criterions to find complete classrooms (a combination of
classroom number and a boy or girl criterion) has to be automatically
set using a search classroom button of a head menu lay-out).
The scripts behind the button has to find the right classroom numbers
and class code, by the pick up of data in that basic one record table.

So not typing the classroom code each time in a global field, but just
by the basic information already found in that one record.


Maybe with this information and more early, you can understand a little
better. I shall copy the earlier information as far as related to this
message and fill in extra information.

----------------------------

Here a screendump of the area of the menu lay-out form with classroom
buttons.
http://www.fotograaf.cc/ftp/knoppen1a.gif

- By not English language, the left wide buttons are buttons to find boy
and girl only (for a complete school), brother and sister, teachers.
The buttons at the right are the classroom code buttons to find each
complete class -

As you can see, each button do contain a typicall classroom code.
The text code of the button itself is read from the fields of the
related basic information table and not directly there by typing these
codes just within the lay-out editing mode itself.
See the menu lay-out form in edit mode, so you can see the used <<……>>
in the buttons.
http://www.fotograaf.cc/ftp/knoppen1b.gif

The area of the one record basic information table containing the
classroom fields is seen here:
http://www.fotograaf.cc/ftp/knoppen2.gif

Changing the “blue” colored codes in the first row, do change the text
of the buttons in the menu button lay-out of above. The "black" codes in
the second, third and fourth row, I want, that these text is used within
scripts, as a criterion for the search actions underneath each button in
the other menu button lay-out.

If a field is empty I have to use an extra script setting to avoid error
messages.



--
Vr.groet - regards, Léon Obers

Reacties per mail, vervang "invalid" door "cc" in het adres.
Reactions by mail, exchange "invalid" by "cc" within address.



Reply With Quote
  #8  
Old   
42
 
Posts: n/a

Default Re: Again trying for a script search solution. - 06-04-2005 , 03:59 AM



In article <d7rpmr$8p9$1 (AT) news1 (DOT) zwoll1.ov.home.nl>,
mail.to.me (AT) fotograaf (DOT) invalid says...
Quote:

Remi-Noel Menegaux wrote:

You may create a global field GF, and show a layout with this field. The
user will then fill GF will the proper search data he wants. A button
nearby will launch the search script :
Enter Find Mode[]
SetField[A, GF]
PerformFind[]
Is this answering your question ?

Well, not exactly. But maybe we come close.
For each of my customers I make an own database file.
I want to change basic database settings for each of these customers
(schools --> I am a school photographer), once.
Ok... so you create your global field X.

Then, per my previous message, your script does this when you push your
button:

Setfield (X, data from related field containing find criteria)
Enter Find Mode
Setfield (find criteria field, X)
Perform Find

(if you have multiple fields containing find criteria you will need one
global for each criteria field)

That should do exactly what you need.



Reply With Quote
  #9  
Old   
Lynn allen
 
Posts: n/a

Default Re: Again trying for a script search solution. - 06-04-2005 , 12:39 PM



Léon Obers <mail.to.me (AT) fotograaf (DOT) invalid> wrote:

Quote:
Sorry if my understanding is not as good.
That solution is searching for "data". That is not my problem.
The point is, how to get a copy of the contents of a field into the
search find "string" within a script, to do a search in the other table.
I think the basic understanding you need to accomplish your goal is that
in Find mode, no information *except that contained in a global field*
is available.

So you must pass your search values from the record into a global or
series of globals, and then enter Find mode, and THEN set the values
from the globals to the regular fields and perform the Find.

No relationships will work in Find Mode. Calculations based on field
data will not work either. Thus, the need to set values first in Browse
mode and then use the globals to transfer the information to Find mode.

Lynn Allen
--
Allen & Allen Semiotics www.semiotics.com
FSA Associate Filemaker Design & Consulting


Reply With Quote
  #10  
Old   
Léon Obers
 
Posts: n/a

Default Lynn, Remie-Noel, 42 - YES !!! - 06-05-2005 , 06:28 PM




Thanks for all the input you give me.

First I did some easy examples, and yes it works.

Afterwards looking to more complicated search options as needed for my
application, first I didn't succeed to get the right output.
But once found, I immediately do have more understanding in the typical
Filemaker options and the way it is dealing to scripts.

And yes also that more difficult search options are running in the way
as expected, completely with some catch from errors if fields are empty.

Here are my results as specific the search options for "one" button.
One button can handle to three combination codes as a classroom
sometimes is a combination of several groups (I made maximum to three).
Boy as well girl search included.
So 6 combinations to get the right search. At the end a sort option.

First the button menu:
http://www.fotograaf.cc/ftp/knoppen1a.gif
(Only up to 13 classrooms buttons)

The Global field table (up to input 16 buttons):
http://www.fotograaf.cc/ftp/knoppen3.gif
The left "blue" text only is used for the incoming text for buttons.
The three "black" text columms for the search criteria.

Finally the script for one button:
http://www.fotograaf.cc/ftp/classrm_script.gif


Thanks again.



--
Vr.groet - regards, Léon Obers

Reacties per mail, vervang "invalid" door "cc" in het adres.
Reactions by mail, exchange "invalid" by "cc" within address.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.