Skip navigation
    3 Replies Latest reply on Jul 5, 2013 10:13 AM by AlastairMcInnes

    Exporting a list



      Exporting a list


           I have a field defined as:

       ValueListItems ( Get ( FileName ) ; "Upsells" )

           The ValueList itself is defined in the database and takes its values from related fields.

           When I look at the results in a list layout, everything is exactly as I would expect - there is a little list of the related records in the field.

           When I try to export it, Filemaker is running all the values together so that I just get a long string of numbers in the Upsells column of the export.

           I tried redefining the field to replace the line breaks in the list with something else:

           Substitute ( ValueListItems ( Get ( FileName ) ; "Upsells" ) ; "¶"; "|" ) 

           And, again, the list is now separated by pipes when I look at it on screen, but, again, when I export it, Filemaker is running all the list items together.

           I've tried exorting as tab-delimited, comma-separated and Excel with the same results each time. I've attached a little picture - the upper bit is a screen shot from Filemaker and the lower bit, the same records by the time they've made their way to Excel (I didn't export the middle column of the Filemaker bit).

           I'm sure I'm doing something obvioulsy wrong, but, whilst I still have some hair left, could someone point it out to me?

           Thanks in advance,


        • 1. Re: Exporting a list

               From another website - you want a list

                    Re: Exporting Value Lists

                              Set the Value List Items into a variable, copy and pasted into a text file. Then copy and pasted into the value list in the new file.
                              Set Variable [ $file; Get( FileName ) ]
                              Set Variable [ $names; ValueListNames ( $file ) ]
                              Set Variable [ $count; ValueCount( $names ) ]
                              Set Variable [ $i; Value:$i+1 ]
                              Exit Loop If [ $i>$count ]
                              Set Variable [ $$result;
                              $$result ;
                              GetValue ( $names ; $i ) ; ¶ ;
                              ValueListItems ( $file ; GetValue ( $names ; $i ) ) ; ¶ ; ¶
                              ) ]
                              End Loop


          • 2. Re: Exporting a list

                 Sorry, I'm not entirely clear, but it looks as if that's going to form a long list of all the value list items from the file which is rather more than I'm after. I'm far from a Filemaker expert, but I don't see the place where it's copied to a text file.

                 To be honest, and I don't want to seem ungrateful, but that seems like a lot of work just to get Filemaker to export what it seems happy to admit are the actual field contents.

                 BUT, many thanks for the response.

            • 3. Re: Exporting a list

                   I figured it out.

                   The field I was using was a calculation field whose result was defined as a number. Although FIlemaker will display this as text, it won't export it. I changed the type to text and all is well.

                   Thanks again, for the suggestion, though.

              More Like This