Global replace of a field in a found set (in a portal) FM 8

Global replace of a field in a found set (in a portal) FM 8

am 10.04.2008 17:40:20 von Deepti

Hello,

I have a layout called members. It has a first name , last name,
institution name etc etc. This layout also has a portal which displays
membership information such as expiration date, year, fee received
etc. ( it imports information from another related table for the
expiration date field).

Now, I do a find on a Institution name : lets say New York University.
I get a found set of 7 records. NYC has membership info in the portal
from the past 3 years so my portal would look like this:

year fee received expiration date invoice number

2006 10$ 10/10/2007 123456
2005 12$ 10/11/2006 7890
2004 10$ 12/11/2005 12345


Now, I need to just update the first row in the above table for all
records in the found set. Is there a way I could do this using a
global replace or would I need a script to perform the above action
for me?

PLEASE HELP!
Thank you.
Deepti.

Re: Global replace of a field in a found set (in a portal) FM 8

am 11.04.2008 08:19:06 von Helpful Harry

In article
,
Deepti wrote:

> Hello,
>
> I have a layout called members. It has a first name , last name,
> institution name etc etc. This layout also has a portal which displays
> membership information such as expiration date, year, fee received
> etc. ( it imports information from another related table for the
> expiration date field).
>
> Now, I do a find on a Institution name : lets say New York University.
> I get a found set of 7 records. NYC has membership info in the portal
> from the past 3 years so my portal would look like this:
>
> year fee received expiration date invoice number
>
> 2006 10$ 10/10/2007 123456
> 2005 12$ 10/11/2006 7890
> 2004 10$ 12/11/2005 12345
>
>
> Now, I need to just update the first row in the above table for all
> records in the found set. Is there a way I could do this using a
> global replace or would I need a script to perform the above action
> for me?

If I understand the set-up correctly, you do not want to update the
first Portal row for each record in the Found Set. Instead it looks
like you need to create a new related record for each record in the
Found Set (ie. a related record for this year's payment). Using your
above example, the Portal would then show:

year fee received expiration date invoice number

2007 12$ 11/12/2008 xxxxx
2006 10$ 10/10/2007 123456
2005 12$ 10/11/2006 7890
2004 10$ 12/11/2005 12345

You might be able to do this via a script, but it would depend on where
/ how you obtain the Invoice Number.

If the Invoice Number has to be manually entered, then you'll have to
manually create the related records. The easiest way is to make sure
the Relationship has the "allow creation of related record" option
turned on, then the Portal wil display a blank row at the bottom into
which you can type new related record data (FileMaker will
automatically set the correct key / link field data from the parent
record being displayed). Once you exit the Portal the new record should
resort to the top because of the reverse date sorting order.

If all 7 records in the Found Set (from your example) are to be given
the same related data, then you could manually enter the data into
Global fields and then have a script create the corresponding 7
related records, transferring the data from the Global fields to the
new related records.


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