Script question

Script question

am 06.09.2007 18:19:54 von Christian Dressler

Hi,

I want a script, which is activated by a button, and changes to another
layout. There it shall search in a certain field for a value of the
other table.

How does the search instruction has to look like? Is it possible to use
variables?

cd

Re: Script question

am 07.09.2007 00:51:59 von Matt Wills

Christian Dressler wrote:
> Hi,
>
> I want a script, which is activated by a button, and changes to another
> layout. There it shall search in a certain field for a value of the
> other table.

The basic thing about a lot of scripts is that they simply mirror what
you would do if you were doing it manually:

Switch to the desired layout
Enter Find Mode
Enter the search value in the field to be searched
Perform Find

Scripted, not much difference:

Go To Layout [ YourLayout ]
Enter Find Mode
Set Field [ theSearchField ; theSearchValue ]
Perform Find

>
> How does the search instruction has to look like? Is it possible to use
> variables?

Are you using a version of FileMaker capable of script variables?

Assuming you are, use the script variable as theSearchValue in the third
step of the script.

Matt
--
Free FileMaker Technique Demos: http://www.VirtualVermont.com/FMP

My Custom Functions:
http://www.briandunning.com/filemaker-custom-functions/resul ts.php?keyword=wills

Re: Script question

am 07.09.2007 09:40:11 von Christian Dressler

>> Hi,
>>
>> I want a script, which is activated by a button, and changes to
>> another layout. There it shall search in a certain field for a value
>> of the other table.
>
> The basic thing about a lot of scripts is that they simply mirror what
> you would do if you were doing it manually:
>
> Switch to the desired layout
> Enter Find Mode
> Enter the search value in the field to be searched
> Perform Find
>
> Scripted, not much difference:
>
> Go To Layout [ YourLayout ]
> Enter Find Mode
> Set Field [ theSearchField ; theSearchValue ]
> Perform Find
>
>>
>> How does the search instruction has to look like? Is it possible to
>> use variables?
>
> Are you using a version of FileMaker capable of script variables?
>
> Assuming you are, use the script variable as theSearchValue in the third
> step of the script.
>
> Matt

Thanks four answer. But my problem is: how can I specify the content of
another table's field in "theSearchValue" ?

cd

Re: Script question

am 07.09.2007 13:57:47 von bill

In article , Christian Dressler
wrote:

> >> Hi,
> >>
> >> I want a script, which is activated by a button, and changes to
> >> another layout. There it shall search in a certain field for a value
> >> of the other table.
> >
> > The basic thing about a lot of scripts is that they simply mirror what
> > you would do if you were doing it manually:
> >
> > Switch to the desired layout
> > Enter Find Mode
> > Enter the search value in the field to be searched
> > Perform Find
> >
> > Scripted, not much difference:
> >
> > Go To Layout [ YourLayout ]
> > Enter Find Mode
> > Set Field [ theSearchField ; theSearchValue ]
> > Perform Find
> >
> >>
> >> How does the search instruction has to look like? Is it possible to
> >> use variables?
> >
> > Are you using a version of FileMaker capable of script variables?
> >
> > Assuming you are, use the script variable as theSearchValue in the third
> > step of the script.
> >
> > Matt
>
> Thanks four answer. But my problem is: how can I specify the content of
> another table's field in "theSearchValue" ?
>
> cd

Either as a script variable in a fairly recent version of Filemaker, or
as a global field in earlier versions.

An early script step, while still in the layout of the first table, is
to set either the script variable or the global field to the value in
the field that you want to use as the basis for the search in the second
layout.

Then when you get to the second layout and the find mode, specify the
value in the search field to be previously set script variable or global
field.

--
For email, change to
Bill Collins

Re: Script question

am 07.09.2007 18:41:21 von Christian Dressler

> Either as a script variable in a fairly recent version of Filemaker, or
> as a global field in earlier versions.
>
> An early script step, while still in the layout of the first table, is
> to set either the script variable or the global field to the value in
> the field that you want to use as the basis for the search in the second
> layout.
>
> Then when you get to the second layout and the find mode, specify the
> value in the search field to be previously set script variable or global
> field.
>
And this is my problem: When try to enter search criteria from static
=2 to
=table1::field1 or to
=$Variable or
=Variable

When I show a message windows with the text table::field, it works! But
not within the search instruction. Please, give me an example, what
exactly has to be written in the field for search criteria.

cd

Re: Script question

am 07.09.2007 19:08:23 von Christian Dressler

> Either as a script variable in a fairly recent version of Filemaker, or
> as a global field in earlier versions.
>
> An early script step, while still in the layout of the first table, is
> to set either the script variable or the global field to the value in
> the field that you want to use as the basis for the search in the second
> layout.
>
> Then when you get to the second layout and the find mode, specify the
> value in the search field to be previously set script variable or global
> field.
>

Now it is working!
Instead of just one step I split it up into more steps to commands like
these:

setvar $var,field
search-mode
setfield field, $var
search

sorry, I have a german version, so I can't provide the original terms.

cd