dbTalk Databases Forums  

set the name of a variable by calculation

comp.databases.filemaker comp.databases.filemaker


Discuss set the name of a variable by calculation in the comp.databases.filemaker forum.



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

Default set the name of a variable by calculation - 11-30-2010 , 03:15 PM






FMP 10 Advanced: in the script step "set variable", the only option to
define the variable name is to hardcode it.

Is there a way to use a calculation to define the variable name, as in
set field by name?
--
http://clk.ch

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

Default Re: set the name of a variable by calculation - 11-30-2010 , 05:35 PM






On 11/30/2010 1:15 PM, Christoph Kaufmann wrote:
Quote:
FMP 10 Advanced: in the script step "set variable", the only option to
define the variable name is to hardcode it.

Is there a way to use a calculation to define the variable name, as in
set field by name?
You can't set the variable name by calc... but you can set the
repetition number by calc, which is useful for creating something like
an array. Probably not what you were looking for, but I thought I'd
point it out just in case.


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

FileMaker Certified Developer
Associate Member, FileMaker Business Alliance

Reply With Quote
  #3  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Re: set the name of a variable by calculation - 12-01-2010 , 08:31 AM



Howard Schlossberg <howard (AT) nospam (DOT) fmprosolutions.com> wrote:

Quote:
you can set the
repetition number by calc, which is useful for creating something like
an array.
It did cross my mind; I decided against it because I'd had to prepare
for very huge repetition numbers - not because I need so many, but
because they would have to match account numbers that have 6 digits or
more.

Now I created an array in a global variable with a loop and use a custom
function to extract value #2 of a given line depending on value #1.
--
http://clk.ch

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

Default Re: set the name of a variable by calculation - 12-01-2010 , 09:00 AM



Christoph Kaufmann wrote:

Quote:
FMP 10 Advanced: in the script step "set variable", the only option to
define the variable name is to hardcode it.

Is there a way to use a calculation to define the variable name, as in
set field by name?
Like this?
http://www.supportgroup.com/explore/...ng-a-variable/

Reply With Quote
  #5  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Re: set the name of a variable by calculation - 12-01-2010 , 11:39 AM



Vandar <vandar69 (AT) yahoo (DOT) com> wrote:

Quote:
Like this?
http://www.supportgroup.com/explore/...ng-a-variable/
Yup. Thank you.

--
http://clk.ch

Reply With Quote
  #6  
Old   
Your Name
 
Posts: n/a

Default Re: set the name of a variable by calculation - 12-01-2010 , 01:52 PM



"Christoph Kaufmann" <clk (AT) tele2 (DOT) ch> wrote

Quote:
Howard Schlossberg <howard (AT) nospam (DOT) fmprosolutions.com> wrote:

you can set the repetition number by calc, which is useful for creating
something like an array.

It did cross my mind; I decided against it because I'd had to prepare
for very huge repetition numbers - not because I need so many, but
because they would have to match account numbers that have 6 digits or
more.

Now I created an array in a global variable with a loop and use a custom
function to extract value #2 of a given line depending on value #1.
Sounds more like you need a new Table and use the Relationship link to
"extract value #2".

Helpful Harry )

Reply With Quote
  #7  
Old   
Lynn Allen
 
Posts: n/a

Default Re: set the name of a variable by calculationX-TraceApproved - 12-01-2010 , 02:17 PM



On 2010-12-01 06:31:36 -0800, clk (AT) tele2 (DOT) ch (Christoph Kaufmann) said:

Quote:
It did cross my mind; I decided against it because I'd had to prepare
for very huge repetition numbers - not because I need so many, but
because they would have to match account numbers that have 6 digits or
more.

Now I created an array in a global variable with a loop and use a custom
function to extract value #2 of a given line depending on value #1.
Repetition numbers are practically infinite, and so useful for
applications like storing and referencing data in large numbers of
them. If you have data in rep # 12345678, and more data in rep
#98765432 (to match different account numbers), the intervening reps
take up no memory and so don't contribute to the overhead of the
solution, or the speed of access to the reps.

Just something else to know about variable repetitions. Might be
useful someday.
--
Lynn Allen
--
www.semiotics.com
Member FBA
FM 10 Certified Developer

Reply With Quote
  #8  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Re: set the name of a variable by calculation - 12-02-2010 , 07:07 AM



Your Name <your.name (AT) isp (DOT) com> wrote:

Quote:
Sounds more like you need a new Table and use the Relationship link to
"extract value #2".
That exists and works, but performance is a problem. A list layout has
in every line a summary field that depends on a calc I can't store
because it uses related records.

I hoped that for this speficic report, I might be better off replacing
the time consuming part of that calc with a variable because variables
are calculated once only and stored locally afterwards.

In the meantime, I found CFs for the purpose at Brian Dunnings's.
--
http://clk.ch

Reply With Quote
  #9  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Re: set the name of a variable by calculation - 12-02-2010 , 07:07 AM



Lynn Allen <lynn (AT) NOT-semiotics (DOT) com> wrote:

Quote:
Repetition numbers are practically infinite, and so useful for
applications like storing and referencing data in large numbers of
them. If you have data in rep # 12345678, and more data in rep
#98765432 (to match different account numbers), the intervening reps
take up no memory and so don't contribute to the overhead of the
solution, or the speed of access to the reps.

Just something else to know about variable repetitions. Might be
useful someday.
Useful indeed, thank you. I begin to see there's more to repetitions
than "workaround for missing relational features in Filemaker pre 3"
:-)
--
http://clk.ch

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.