dbTalk Databases Forums  

Custom Fonction

comp.databases.filemaker comp.databases.filemaker


Discuss Custom Fonction in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JF
 
Posts: n/a

Default Custom Fonction - 04-01-2007 , 10:24 AM






Hi

where can I find a good examples of custom fonctions and that use parameters
?? the help file is pretty vague on the the way to use it.

Thank you

JF



Reply With Quote
  #2  
Old   
Matt Wills
 
Posts: n/a

Default Re: Custom Fonction - 04-01-2007 , 01:13 PM








On 04/01/2007 11:24:08 "JF" <bizouman_takethisout (AT) hotmail (DOT) com> wrote:

Quote:
Hi

where can I find a good examples of custom fonctions and that use
parameters ?? the help file is pretty vague on the the way to use it.

Thank you

Brian Dunning provides a repository of Custom Functions at http://www.briandunning.com/filemake...tions/list.php.

You can search for specific uses, dependant on what keywords a developer may have used in the listing when the CF was contributed.

Matt


Reply With Quote
  #3  
Old   
JF
 
Posts: n/a

Default Re: Custom Fonction - 04-01-2007 , 05:47 PM



WOW that's a list of many custom fonction..... but where can we learn to
make use of the "parameters"

FM Help only told us that we can add some parameters, but how, where and for
what purpose ??.

Maybe it's me that is too dumb this sunday to cath it !!


JF


"Matt Wills" <I'm (AT) witz (DOT) end> a écrit dans le message de news:
411413.OASONCTX (AT) news (DOT) verizon.net...
Quote:

On 04/01/2007 11:24:08 "JF" <bizouman_takethisout (AT) hotmail (DOT) com> wrote:

Hi

where can I find a good examples of custom fonctions and that use
parameters ?? the help file is pretty vague on the the way to use it.

Thank you


Brian Dunning provides a repository of Custom Functions at
http://www.briandunning.com/filemake...tions/list.php.

You can search for specific uses, dependant on what keywords a developer
may have used in the listing when the CF was contributed.

Matt



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

Default Re: Custom Fonction - 04-01-2007 , 06:33 PM




"JF" <bizouman_takethisout (AT) hotmail (DOT) com> schreef in bericht
news:sEWPh.20688$ig1.117568 (AT) weber (DOT) videotron.net...
Quote:
WOW that's a list of many custom fonction..... but where can we learn to
make use of the "parameters"

FM Help only told us that we can add some parameters, but how, where and
for what purpose ??.

Maybe it's me that is too dumb this sunday to cath it !!


JF


A custom function can only work with some data you send it. This data is
called a parameter. To make use of a parameter it will have a name. Often
you will find that the name says something about the sort of data the
customfunction expects. So when you work function that subtracts two numbers
a high number and a low number, you might expect that the function is called
with

MyFunction ( LowNum ; HighNum )

The function itself might substract these numbers and will look like

MyFunction
Parameters: LowNum ; HighNum

HighNum - LowNum

Keep well, Ursus




Reply With Quote
  #5  
Old   
JF
 
Posts: n/a

Default Re: Custom Fonction - 04-01-2007 , 08:36 PM



OK, but is your HighNum and LowNum are fields names ?? or Variables ?? that
you set with the Set fonction ? and how will those parameter will reacte
with the custom fonction ??

Thank you


JF


"Ursus" <ursus.kirk (AT) wanadoo (DOT) nl> a écrit dans le message de news:
46104151$0$83367$dbd4b001 (AT) news (DOT) wanadoo.nl...
Quote:
"JF" <bizouman_takethisout (AT) hotmail (DOT) com> schreef in bericht
news:sEWPh.20688$ig1.117568 (AT) weber (DOT) videotron.net...
WOW that's a list of many custom fonction..... but where can we learn to
make use of the "parameters"

FM Help only told us that we can add some parameters, but how, where and
for what purpose ??.

Maybe it's me that is too dumb this sunday to cath it !!


JF



A custom function can only work with some data you send it. This data is
called a parameter. To make use of a parameter it will have a name. Often
you will find that the name says something about the sort of data the
customfunction expects. So when you work function that subtracts two
numbers a high number and a low number, you might expect that the function
is called with

MyFunction ( LowNum ; HighNum )

The function itself might substract these numbers and will look like

MyFunction
Parameters: LowNum ; HighNum

HighNum - LowNum

Keep well, Ursus





Reply With Quote
  #6  
Old   
Ursus
 
Posts: n/a

Default Re: Custom Fonction - 04-02-2007 , 01:55 AM




"JF" <bizouman_takethisout (AT) hotmail (DOT) com> schreef in bericht
news:97ZPh.26956$ig1.154898 (AT) weber (DOT) videotron.net...
Quote:
OK, but is your HighNum and LowNum are fields names ?? or Variables ??
that you set with the Set fonction ? and how will those parameter will
reacte with the custom fonction ??

Thank you


JF



MyFunction ( LowNum ; HighNum )

The function itself might substract these numbers and will look like

MyFunction
Parameters: LowNum ; HighNum

HighNum - LowNum

Keep well, Ursus

They are NOT fieldsnames, NOT variablenames. They are parameters. You can
look at them as if they were pipelines. Like a waterpipe. You transport a
value through them. For example you have a database with two numberfields:
Begin and End. They hold a value, for example 4 and 5. Now you want to use
the function I have meantioned above. You create a calculation
cMyResult <number ; MyFunction ( Begin ; End ) >

This will return 1 ( 5-4 )

If you turn the fields around:
cMyResult <number ; MyFunction ( End ; Begin) >

It returns -1 (4-5)

So this is how it works with
cMyResult <number ; MyFunction ( Begin ; End ) >

The field Begin holds the value of 4.
The custom function MyFunction has two parameters LowNum and HighNum.
The calculation puts the value of Begin in the parameter LowNum. The result
is that the value of 4 is transported to MyFunction through the pipeline
called LowNum.
The calculation puts the value of Endin the parameter HighNum. The result is
that the value of 5 is transported to MyFunction through the pipeline called
HigNum.
The function processes these two parameters (pipelines). In this case LowNum
= End = 5 minus HighNum = Begin = 4. 5 minus 4 equals 1. The function
returns 1 to the calculation.

Ofcourse this is a very simple example but I hope you now understand
parameters.

Keep well, Ursus




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.