dbTalk Databases Forums  

Help On Portals & Repeating Fields

comp.databases.filemaker comp.databases.filemaker


Discuss Help On Portals & Repeating Fields in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Linda & Jason
 
Posts: n/a

Default Help On Portals & Repeating Fields - 08-02-2003 , 12:10 PM






Question.....

I am working with a situation that has the client concerned over the amount
of time she spends in repeating the same information in portal rows.

I have created a script with button to copy and paste the first line, and
portal field to new rows that follow below. Across the portals, there are
several categories that need repeating so she does not have to manually
enter the same information over and over.

However, in creating this script, the first field goes down as many times
as there are request, but when she goes to the second field for repeating,
the lines drop further down and this goes on for each button that is tied to
the repeating script. In short, it is driving her and me a bit nuts.

What can I do to create a script that will allow each for such copy and
paste without all the additional waste of unnecessary rows?

I have not tired doing a script tying all the repeating scripts together,
but if there is a sure fire way of doing these portal repeating fields nice
and clean, I would like to know how.

Thanks in advance...

Jason



Reply With Quote
  #2  
Old   
Bridget Eley
 
Posts: n/a

Default Re: Help On Portals & Repeating Fields - 08-02-2003 , 05:00 PM






PS Same principle applies to repeating fields:

....
Set Field [ GlobalField1, Relationship::Field1 ]
Set Field [ GlobalField1-2, GetRepetition (Relationship::Field1,2) ]
Set Field [ GlobalField1-3, GetRepetition (Relationship::Field1,3) ]
(and so on)
....
Set Field [ Relationship::Field1, GlobalField1 ]
Set Field [ Relationship::Field1-2, GetRepetition (GlobalField1,2) ]
Set Field [ Relationship::Field1-3, GetRepetition (GlobalField1,3) ]
(and so on)
....

Bridget Eley

in article BB526876.2400%bridgeteley (AT) ihug (DOT) com.au, Bridget Eley at
bridgeteley (AT) ihug (DOT) com.au wrote on 3/8/03 7:21 AM:

Quote:
Hi Jason

A script like this will set the values of 1 or more fields in the first
related record to a series of new related records up to the numeric value
set in #Request (global number field in which to manually input number of
requests required):

If [IsEmpty (#Requests) ]
Beep
Show Message [ "Please enter the number of requests in #Request" ]
Else
Set Field [ GlobalField1, Relationship::Field1 ]
Set Field [ GlobalField2, Relationship::Field2 ]
Loop
Go to Portal Row [ Last, Select entire contents ]
Set Field [ Relationship::Field1, GlobalField1 ]
Set Field [ Relationship::Field2, GlobalField2 ]
Exit Loop If [ Status(CurrentPortalRow) = #Request ]
End Loop
End If

The relationship must be set to allow the creation of new related records.

If you need to be able copy down values from 1 or more fields in the first
related record to a number of other related records that have already been
created, you will need a Counter (global number field):

Set Field [ GlobalField3, Relationship::Field3 ]
Set Field [ GlobalField4, Relationship::Field4 ]
Set Field [ Counter, 2 ]
Go to Portal Row [ Counter ] [ By Field ValueŠ, Select entire contents ]
Loop
Set Field [ Relationship::Field3, GlobalField3 ]
Set Field [ Relationship::Field4, GlobalField4 ]
Exit Loop If [ Counter = Count (Relationship::MatchField) ]
Set Field [ Counter, Counter + 1 ]
Go to Portal Row [ Counter ] [ By Field ValueŠ, Select entire contents ]
End Loop

Bridget Eley

in article f_acnQnUEt6fbLaiXTWJhQ (AT) shawneelink (DOT) net, Linda & Jason at
towersq (AT) shawneelink (DOT) net wrote on 3/8/03 3:10 AM:

Question.....

I am working with a situation that has the client concerned over the amount
of time she spends in repeating the same information in portal rows.

I have created a script with button to copy and paste the first line, and
portal field to new rows that follow below. Across the portals, there are
several categories that need repeating so she does not have to manually
enter the same information over and over.

However, in creating this script, the first field goes down as many times
as there are request, but when she goes to the second field for repeating,
the lines drop further down and this goes on for each button that is tied to
the repeating script. In short, it is driving her and me a bit nuts.

What can I do to create a script that will allow each for such copy and
paste without all the additional waste of unnecessary rows?

I have not tired doing a script tying all the repeating scripts together,
but if there is a sure fire way of doing these portal repeating fields nice
and clean, I would like to know how.

Thanks in advance...

Jason





Reply With Quote
  #3  
Old   
Bridget Eley
 
Posts: n/a

Default Re: Help On Portals & Repeating Fields (CORRECTION) - 08-04-2003 , 07:44 PM



On further testing, I learned something new about the way FileMaker handles
repetitions. If you set repetition x (where x = repetition > 1) of a field
to a value in another field and the other field is also a repeating field,
FileMaker seems to know that you want it to grab the same repetition number
from the other field. Not only is there no need to use GetRepetition but the
script fails if you use it!

Bridget Eley

in article BB527190.240C%bridgeteley (AT) ihug (DOT) com.au, Bridget Eley at
bridgeteley (AT) ihug (DOT) com.au wrote on 3/8/03 8:00 AM:

Quote:
PS Same principle applies to repeating fields:

...
Set Field [ GlobalField1, Relationship::Field1 ]
Set Field [ GlobalField1-2, GetRepetition (Relationship::Field1,2) ]
Set Field [ GlobalField1-3, GetRepetition (Relationship::Field1,3) ]
(and so on)
...
Set Field [ Relationship::Field1, GlobalField1 ]
Set Field [ Relationship::Field1-2, GetRepetition (GlobalField1,2) ]
Set Field [ Relationship::Field1-3, GetRepetition (GlobalField1,3) ]
(and so on)
...

Bridget Eley

in article BB526876.2400%bridgeteley (AT) ihug (DOT) com.au, Bridget Eley at
bridgeteley (AT) ihug (DOT) com.au wrote on 3/8/03 7:21 AM:

Hi Jason

A script like this will set the values of 1 or more fields in the first
related record to a series of new related records up to the numeric value
set in #Request (global number field in which to manually input number of
requests required):

If [IsEmpty (#Requests) ]
Beep
Show Message [ "Please enter the number of requests in #Request" ]
Else
Set Field [ GlobalField1, Relationship::Field1 ]
Set Field [ GlobalField2, Relationship::Field2 ]
Loop
Go to Portal Row [ Last, Select entire contents ]
Set Field [ Relationship::Field1, GlobalField1 ]
Set Field [ Relationship::Field2, GlobalField2 ]
Exit Loop If [ Status(CurrentPortalRow) = #Request ]
End Loop
End If

The relationship must be set to allow the creation of new related records.

If you need to be able copy down values from 1 or more fields in the first
related record to a number of other related records that have already been
created, you will need a Counter (global number field):

Set Field [ GlobalField3, Relationship::Field3 ]
Set Field [ GlobalField4, Relationship::Field4 ]
Set Field [ Counter, 2 ]
Go to Portal Row [ Counter ] [ By Field ValueŠ, Select entire contents ]
Loop
Set Field [ Relationship::Field3, GlobalField3 ]
Set Field [ Relationship::Field4, GlobalField4 ]
Exit Loop If [ Counter = Count (Relationship::MatchField) ]
Set Field [ Counter, Counter + 1 ]
Go to Portal Row [ Counter ] [ By Field ValueŠ, Select entire contents ]
End Loop

Bridget Eley

in article f_acnQnUEt6fbLaiXTWJhQ (AT) shawneelink (DOT) net, Linda & Jason at
towersq (AT) shawneelink (DOT) net wrote on 3/8/03 3:10 AM:

Question.....

I am working with a situation that has the client concerned over the amount
of time she spends in repeating the same information in portal rows.

I have created a script with button to copy and paste the first line, and
portal field to new rows that follow below. Across the portals, there are
several categories that need repeating so she does not have to manually
enter the same information over and over.

However, in creating this script, the first field goes down as many times
as there are request, but when she goes to the second field for repeating,
the lines drop further down and this goes on for each button that is tied to
the repeating script. In short, it is driving her and me a bit nuts.

What can I do to create a script that will allow each for such copy and
paste without all the additional waste of unnecessary rows?

I have not tired doing a script tying all the repeating scripts together,
but if there is a sure fire way of doing these portal repeating fields nice
and clean, I would like to know how.

Thanks in advance...

Jason






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.