dbTalk Databases Forums  

Help Using Variables

comp.databases.filemaker comp.databases.filemaker


Discuss Help Using Variables in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
squeed2000@yahoo.com
 
Posts: n/a

Default Help Using Variables - 02-03-2007 , 09:39 PM






I have a field set in my database that I want to use to control a
loop. The field is set as a global and contains the number 100. I
want my script to create new records based on the number in that
field. I think that I need to use variables to do that. But I'm not
sure how to use a variable and how to add to it.

I've set a variable $$a and assigned it the value in that field. But
how do you do a $$a=$$a+1 ?

-S


Reply With Quote
  #2  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Help Using Variables - 02-03-2007 , 10:00 PM






Same way you set the variable initially: the Set Variable script step,
where you would set $a to $a+1

Note that I have used a single dollar sign on the variable? This is the
best way to name a variable that should be local to the running script.

squeed2000 (AT) yahoo (DOT) com wrote:
Quote:
I have a field set in my database that I want to use to control a
loop. The field is set as a global and contains the number 100. I
want my script to create new records based on the number in that
field. I think that I need to use variables to do that. But I'm not
sure how to use a variable and how to add to it.

I've set a variable $$a and assigned it the value in that field. But
how do you do a $$a=$$a+1 ?

-S

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg
FM Professional Solutions, Inc. Los Angeles

FileMaker 8 Certified Developer
Associate Member, FileMaker Solutions Alliance


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

Default Re: Help Using Variables - 02-04-2007 , 06:48 AM



<squeed2000 (AT) yahoo (DOT) com> wrote:

Quote:
I think that I need to use variables to do that. But I'm not
sure how to use a variable and how to add to it.
you can use a variable or decrement the global, with the field of the
new record being calculated once after the global's value.
I Think taht script with the variable is speediest.
--
Philippe Manet


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

Default Re: Help Using Variables - 02-06-2007 , 08:49 PM



And per your reference to $$a, if you use $$ then the variable is
available to your entire application. If you use $ then the variable
is only available within the script that is using it. I personally
prefer to use $ vars and use global fields for application wide needs.

On Feb 4, 4:48 am, pma... (AT) invivo (DOT) edu (manet) wrote:
Quote:
squeed2... (AT) yahoo (DOT) com> wrote:
I think that I need to use variables to do that. But I'm not
sure how to use a variable and how to add to it.

you can use a variable or decrement the global, with the field of the
new record being calculated once after the global's value.
I Think taht script with the variable is speediest.
--
Philippe Manet



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.