VariablesLoadFromLog ( )

Function stats

Average user rating
5.0000
37
104
9999
Support
FileMaker 8.0 +
Date posted
05 December 2008
Last updated
02 October 2013
Version
Recursive function
Yes

Author Info
 Fabrice

74 functions

Average Rating 4.4

author_avatar



 

Function overview

Prototype

VariablesLoadFromLog  ( _varlog )


Parameters

_varlog  a list of variables declared by function VariablesLog


Description

Tags:  Variables   Debug  

sets variables logged by VariablesLog function.
Typically, use VariableLog function to set variables in a file, then pass them to another file by passing
$$VariablesLog as the VariableLoadFromLog function argument.

Examples

Sample input

VariablesLoadFromLog ( Get ( ScriptParameter ))


Sample output

declares all the varibables listed in the script parameter (potentially from another file)

 

Function code

/*
VariablesLoadFromLog ( _varlog )
by Fabrice Nordmann

Uses VariablesLog function.

sets variables logged by VariablesLog function.
Typically, use VariableLog function to set variables in a file, then pass them to another file by passing
$$VariablesLog as the VariableLoadFromLog function argument.


v.1.1 Apr 2008, Fabrice Nordmann
adapted for new version of VariableLog (takes repetition number)
*/


Case ( ValueCount ( _varlog ) <= 1 // VariablesLog function uses first line as a title
; ""
; Let ([
_lastval = Substitute ( RightValues ( _varlog ; 1 ) ; ¶ ; "" )
; _pos = Position ( _lastval ; "|" ; 1 ; 1 )
; _key = Left ( _lastval ; _pos -1 )
; _value = Substitute ( Right ( _lastval ; Length ( _lastval ) - _pos ) ; "#CR#" ; ¶ )
; _dim = VariablesLog ( _key ; 1 ; _value )
];
VariablesLoadFromLog ( LeftValues ( _varlog ; ValueCount ( _varlog ) - 1 ))
) // Let
) // Case



// ===================================
/*

    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/104

    Prototype: VariablesLoadFromLog( _varlog )
    Function Author: Fabrice (http://www.fmfunctions.com/mid/37)
    Last updated: 02 October 2013
    Version: 1.4

*/
// ===================================