On Aug 30, 2008, at 9:47 PM, barbpassman wrote:

When I export my FMP records to Excel.
Excel only picks up the first course listed in the uppermost row in the portal. I had hoped there was something I could do in FMP so that all the values in the portal get exported but it seems that is not feasible

If you are using FMP7 or higher, you could define a calculation field to grab ALL the related records. Here is a recursive custom function that could be defined to allow you to do it (You'll need FMP7 Developer or higher to define the CF):

GetNthRecordSet ( fieldName ; recordNumStart ; recordNumEnd  ) =

Let (
[
// ------ BEGIN VARIABLE DECLARATIONS BELOW -----
startParam = recordNumStart ;
start = Case ( startParam < 1 ; 1 ; startparam ) ;
end = recordNumEnd ;
thisVal = Case ( // this limits "?" result on empty related records
IsValid ( GetNthRecord ( fieldName ; start ) ) ;
                         GetNthRecord ( fieldName ; start )
                        ) ; // END CASE
nextStart = start + 1
] ;
// ----------- FUNCTION RESULTS BELOW -----------

thisVal &
Case (
                    // TEST 1: the next value exists to use
          IsValid ( GetNthRecord ( fieldName ; nextStart ) ) and

// TEST 2: Either no end Value given or next value is within the end value
          ( ( end = "" or end = 0 ) or nextStart <= end ) ;

                   // RESULT: Return Character & Recurse again
          "ΒΆ" & GetNthRecordSet ( fieldName ; nextStart ; end ) ;
        ) // END CASE

) // END LET

--------------------------------

With this CF, you can then define one concatenated field in the related table that would hold the field values. For example:

Portal_Line = (Calculation, Text Result) = relFieldA & "|" & relFieldB & "|" & relFieldC

Then in the PARENT table, define a calculation that uses the Related::Portal_Line field:

GetNthRecordSet ( Related::Portal_Line ; 1 ; Count (Related::Portal_Line) )

Then add that field to you export.

I know this is semi-brief. If this is unclear, let me know.

Hope this help :-)

Don Wieland
D W   D a t a   C o n c e p t s
~~~~~~~~~~~~~~~~~~~~~~~~~
[EMAIL PROTECTED]
Direct Line - (714) 389-4026

Integrated data solutions to fit your business needs.

JUST RELEASED - Appointment 1.0v9 for FileMaker Pro 9
http://www.appointment10.com

For a quick video overview -
http://www.appointment10.com/Appt10_Promo/Overview.html

For video tutorials -
http://www.appointment10.com/Appt10_Promo/Overview.html

Reply via email to