dbTalk Databases Forums  

Setting Specify Field Repetition Number

comp.databases.filemaker comp.databases.filemaker


Discuss Setting Specify Field Repetition Number in the comp.databases.filemaker forum.



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

Default Setting Specify Field Repetition Number - 07-13-2005 , 06:45 PM






In script steps where I want to set a specific repetition on a
repeating field, is there a way to assign the repetition number by
calculation rather than manually (i.e., non-variably) in the Specify
Field dialog? Right now I use the Set Field step and specify the
repetition of the target field manually, whereas the result field can
be managed via calculation.

I know there were no workarounds (other than logical arguments) in FM6,
but perhaps FM7 has resolved this. If so, I haven't found it. Anyone?

Thanks as always.
-Sug


Reply With Quote
  #2  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Setting Specify Field Repetition Number - 07-15-2005 , 01:24 AM






In article <1121298314.366531.125510 (AT) g49g2000cwa (DOT) googlegroups.com>,
"Sug" <adam.sugerman (AT) gmail (DOT) com> wrote:

Quote:
In script steps where I want to set a specific repetition on a
repeating field, is there a way to assign the repetition number by
calculation rather than manually (i.e., non-variably) in the Specify
Field dialog? Right now I use the Set Field step and specify the
repetition of the target field manually, whereas the result field can
be managed via calculation.

I know there were no workarounds (other than logical arguments) in FM6,
but perhaps FM7 has resolved this. If so, I haven't found it. Anyone?
Although there is a Get Repetition function which allows a field value
to be used to specifiy the repetition, there is no equivalent Set
Repetition command - the one main problem that makes Repeating fields
almost useless and the command that's for some strange reason FileMaker
Inc refuses to put in since they added repeating fields. A lot like
their parent company Apple, some of FileMaker Inc's decisions are just
plain weird. (

There are some ways around it. The simplest is probably to have your
own Global fields and script.
ie.
RepetitionToSet Global, Number
ValueToSet Global, {whatever type needed}

Script: SetRepetition
If [RepetitionToSet = 1]
Set Field [RepeatField, ValueToSet]
End If
If [RepetitionToSet = 2]
Set Field [RepeatField -2, ValueToSet]
End If
...
If [RepetitionToSet = X]
Set Field [RepeatField -X, ValueToSet]
End If

These can then be easily used from any other script
eg.
Set Field [RepetitionToSet, 5]
Set Field [ValueToSet, "Fred Flintstone"]
Perform Script [SetRepetition]


There is another way which uses the Extend function, but it gets
complicated and the above is much easier to understand and fix. )



Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


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.