Help wanted: If - Else - End If // search solution

  • Follow


FM 7v3 - Windows


Just an easy solution for the FM goeroes I think,
but I am not. Can somebody give the right script steps
in the FM language.

I want to make a script that does the following:

=============================
Set Error Capture [on]
Find Records   table::Field-A [!]
If
  a search brings no valid records,
  go to layout A
Else
  go to layout B
Endif
=============================

The difficult part for me is if there is a function that do give the
number of found records (I can not find). If found records = 0
than the above trick can be made easy.


Regards, Leon Obers

0
Reply leon.obers (19) 6/10/2005 9:07:33 PM

In article <1118437653.274487.257720@z14g2000cwz.googlegroups.com>, 
leon.obers@iae.nl says...
> 
> FM 7v3 - Windows
> 
> 
> Just an easy solution for the FM goeroes I think,
> but I am not. Can somebody give the right script steps
> in the FM language.
> 
> I want to make a script that does the following:
> 
> =============================
> Set Error Capture [on]
> Find Records   table::Field-A [!]
> If
>   a search brings no valid records,
>   go to layout A
> Else
>   go to layout B
> Endif
> =============================
> 
> The difficult part for me is if there is a function that do give the
> number of found records (I can not find). If found records = 0
> than the above trick can be made easy.
> 
> 
> Regards, Leon Obers
> 
> 

Status(CurrentFoundCount)

0
Reply 42 6/10/2005 9:19:55 PM


<leon.obers@iae.nl> wrote:

> FM 7v3 - Windows
> 
> 
> Just an easy solution for the FM goeroes I think,
> but I am not. Can somebody give the right script steps
> in the FM language.
> 
> I want to make a script that does the following:
> 
> =============================
> Set Error Capture [on]
> Find Records   table::Field-A [!]
> If
>   a search brings no valid records,
>   go to layout A
> Else
>   go to layout B
> Endif
> =============================
> 
> The difficult part for me is if there is a function that do give the
> number of found records (I can not find). If found records = 0
> than the above trick can be made easy.

You need to search in the Help under Status functions (for FM6) or Get
functions for FM 7.

Status(CurrentFoundCount)

or 

Get(FoundCount)

The lists of those functions in the Help index are extremely useful. I
refer to them all the time.

Lynn Allen
--
Allen & Allen Semiotics        www.semiotics.com
FSA Associate       Filemaker Design & Consulting 
0
Reply lynn 6/10/2005 9:24:27 PM

In article <1gxy2cz.1lnqiqh51py8N%lynn@NOT-semiotics.com>,
lynn@NOT-semiotics.com (Lynn allen) wrote:

> <leon.obers@iae.nl> wrote:
> 
> > FM 7v3 - Windows
> > 
> > 
> > Just an easy solution for the FM goeroes I think,
> > but I am not. Can somebody give the right script steps
> > in the FM language.
> > 
> > I want to make a script that does the following:
> > 
> > =============================
> > Set Error Capture [on]
> > Find Records   table::Field-A [!]
> > If
> >   a search brings no valid records,
> >   go to layout A
> > Else
> >   go to layout B
> > Endif
> > =============================
> > 
> > The difficult part for me is if there is a function that do give the
> > number of found records (I can not find). If found records = 0
> > than the above trick can be made easy.
> 
> You need to search in the Help under Status functions (for FM6) or Get
> functions for FM 7.
> 
> Status(CurrentFoundCount)
> 
> or 
> 
> Get(FoundCount)
> 
> The lists of those functions in the Help index are extremely useful. I
> refer to them all the time.

Another set of functions that are often overlooked (although less
useful) are the "Design Functions" that allow you to fdo things like
obtain a list of fields on a particular layout, or the values from a
value list, etc.



Helpful Harry                   
Hopefully helping harassed humans happily handle handiwork hardships  ;o)
0
Reply Helpful 6/10/2005 10:48:16 PM

Thanks to you, 42 and Harry,


Works great. Have made an extensive user GUI with many automatic look-up 
functions.


Lynn allen wrote:
> Status(CurrentFoundCount)
> 
> or 
> 
> Get(FoundCount)
> 
> The lists of those functions in the Help index are extremely useful. I
> refer to them all the time.

I am using a different base language (Dutch). Sometimes translation of 
functions within the typical FM script basics, I am not as familiar with 
it (yet), and you can overlook functions very easily. Also I have to get 
used to the way of the FM script method of approach. The more you work 
in it, the more familiar. It brings many possibities and that makes fun.

Well, till the next time (I guess working on further and developing a 
database shall bring more questions).




-- 
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.

0
Reply ISO 6/11/2005 1:21:17 PM

4 Replies
241 Views

(page loaded in 0.144 seconds)

Similiar Articles:













7/25/2012 3:17:42 AM


Reply: