Portal_Filter ( )

Function stats

Average user rating
161
221
9999
Support
FileMaker 10.0 +
Date posted
09 May 2009
Version
1
Recursive function
No

Author Info
 kaostika

1 functions

Average Rating None

author_avatar



 

Function overview

Prototype

Portal_Filter  ( Field;   FirstCharacter;   LastCharacter;   All )


Parameters

Field  Field name


FirstCharacter  This is the starting Character i.e. "A"


LastCharacter  The last Character is "z"


All  if 1 will show all related values


Description

Tags:  Filter  

Some portal filter functions require the use of a greater than and less than to create and upper and lower boundary to show the records. This create a list of all the values if the filter field is empty. It use the Code function to get the boundaries for the custom list.

Oreste

Examples

Sample input

Portal_filter ( Filter Global ; "A"; "z" ;1)


Sample output

Shows a list of all characters from A to z if the field is empty, if not is puts in the field value

 

Function code

/*
Portal_Filter ( Field ;FirstCharacter;LastCharacter;all)
This function will allow the = sign to be used in a relationship rather than both agreater then less than equal signs. It puts in a list of all the values in the filter if the main filter is empty showing all, if all is set to 1.

*/
Let ( [

_field = Field ;
_FC=Code(Left ( FirstCharacter ; 1 ));
_lc = Code(Left ( LastCharacter ; 1 ));
_All=If (all;CustomList ( _fc; _lc ; "char ([n])" );"")

];


Case (
IsEmpty(_field); _all;

_field )
)

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

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

    Prototype: Portal_Filter( Field; FirstCharacter; LastCharacter; All )
    Function Author: kaostika (http://www.fmfunctions.com/mid/161)
    Last updated: 09 May 2009
    Version: 1

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