Function overview
Prototype
ValueListForExport (
)
Parameters
No parameters for this function.
Description
Tags:
List Export
Returns a string suitable for export of all the Value Lists of the DB.
FileMaker can create a new DB based on the generated .txt file that will have:
One record
As many fields as the number of the value lists ( with their names )
All the values into each field
Examples
Sample input
ValueListForExport
Sample output
The alphabet !! Flag ( one ) More and more ...
abcdefghkjilmnopqrstuvwxyz 1 One MoreTwoXOneTwo-EdgedThreeSomeoneXrayFour
Function code
/*
ValueListForExport Custom Function
Author: Daniele Raybaudi
Parameter: none
Recursive: yes
Returns a string suitable for export of all the Value Lists of the DB.
FileMaker can create a new DB based on the generated .txt file that will have:
One record
As many fields as the number of the value lists ( with their names )
All the values into each field
*/
Let([
vlNames = ValueListNames ( Get ( FileName ) ) ;
$count = $count + 1 ;
vlName = GetValue ( vlNames ; $count ) ;
vlValues = If ( $count > 1 ; " " ) & Substitute ( ValueListItems ( Get ( FileName ) ; vlName ) ; [ " " ; " " ] ; [ ¶ ; "" ] )
];
Case(
$count = 1 ; Substitute ( vlNames ; ¶ ; " " ) & ¶ & vlValues & ValueListForExport ( ) ;
$count ≤ ValueCount ( vlNames ) ; vlValues & ValueListForExport ( ) ;
Let ( $count = "" ; "" )
)
)
// ===================================
/*
This function is published on FileMaker Custom Functions
to check for updates and provide feedback and bug reports
please visit http://www.fmfunctions.com/fid/263
Prototype: ValueListForExport( )
Function Author: Daniele Raybaudi (http://www.fmfunctions.com/mid/38)
Last updated: 22 August 2010
Version: 1
*/
// ===================================
/*__LITBR__ValueListForExport Custom Function__LITBR____LITBR__Author: Daniele Raybaudi__LITBR__Parameter: none__LITBR__Recursive: yes__LITBR____LITBR__Returns a string suitable for export of all the Value Lists of the DB.__LITBR____LITBR__FileMaker can create a new DB based on the generated .txt file that will have:__LITBR__One record__LITBR__As many fields as the number of the value lists ( with their names )__LITBR__All the values into each field __LITBR__*/__LITBR____LITBR__Let([__LITBR__vlNames = ValueListNames ( Get ( FileName ) ) ;__LITBR__$count = $count + 1 ;__LITBR__vlName = GetValue ( vlNames ; $count ) ;__LITBR__vlValues = If ( $count > 1 ; " " ) & Substitute ( ValueListItems ( Get ( FileName ) ; vlName ) ; [ " " ; " " ] ; [ ¶ ; "" ] )__LITBR__];__LITBR__Case(__LITBR__$count = 1 ; Substitute ( vlNames ; ¶ ; " " ) & ¶ & vlValues & ValueListForExport ( ) ;__LITBR__$count ≤ ValueCount ( vlNames ) ; vlValues & ValueListForExport ( ) ;__LITBR__Let ( $count = "" ; "" )__LITBR__)__LITBR__)__LITBR____LITBR__// ===================================__LITBR__/*__LITBR____LITBR__ This function is published on FileMaker Custom Functions__LITBR__ to check for updates and provide feedback and bug reports__LITBR__ please visit http://www.fmfunctions.com/fid/263__LITBR____LITBR__ Prototype: ValueListForExport( )__LITBR__ Function Author: Daniele Raybaudi (http://www.fmfunctions.com/mid/38)__LITBR__ Last updated: 22 August 2010__LITBR__ Version: 1__LITBR____LITBR__*/__LITBR__// ===================================