PrevValue ( )

Function stats

Average user rating
34
167
9999
Support
FileMaker 8.0 +
Date posted
24 December 2008
Version
1
Recursive function
No

Author Info
 The Shadow

22 functions

Average Rating 4.3

author_avatar



 

Function overview

Prototype

PrevValue  ( valueIter )


Parameters

valueIter  The value-iterator to iterate over


Description

Tags:  ValueIterator  

This function uses a value-iterator "object" that is created with the ValueIterator function.

This function provides a backward iterator over the list of values.

The forward iterator is called NextValue().

Examples

Sample input

PrevValue( ResetToEnd( ValueIterator( "ape¶bear¶jam" ) ))


Sample output

jam

 

Function code

Let( [ currentIdx = _getVariable( valueIter; 1 );
values = _getVariable( valueIter; 0 ) ];

If ( currentIdx > 0;
Let( [ currentIdx = currentIdx-1;
prevValue = GetValue( values; currentIdx );
jnk = _setVariable( valueIter; 1; currentIdx )
];
prevValue
)
)
)

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

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

    Prototype: PrevValue( valueIter )
    Function Author: The Shadow (http://www.fmfunctions.com/mid/34)
    Last updated: 24 December 2008
    Version: 1

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