Function overview
Prototype
visualiseNumbers (
content; string; value )
Parameters
content
string
value
Description
Tags:
numbers visualise string
I was looking to find a way to make a list or string of numbers be graphically represented.
Can't remember when GetValue was added - think it was 8.5
Examples
Sample input
visualiseNumbers ( "5¶4¶5¶8" ; "x" ; 3 )
Sample output
|xxxxx|xxxx|xxxxx|xxxxxxxx|
Function code
/*
Name:
visualiseNumbers
History:
Created by Tim Anderson, Tim Anderson Group
www.timanderson.co.uk
Creation Date: 29 April 2009
Purpose:
To convert a list of numbers into a text line of characters defined by the numbers
Parameters:
Content
string
value
Example:
visualiseNumbers ( "5¶4¶5¶8" ; "x" ; 3 ) gives |xxxxx|xxxx|xxxxx|xxxxxxxx|
Requires Other Custom Functions:
string.repeat(str;number)
If (number > 0 ;
str & If ( number > 1 ; string.repeat ( str ; number - 1) ; "")
Other Notes:
The value must always be the number of values-1.
Options:
None
*/
// visualiseNumbers( Content ; string; value)
Let(_NumVals=ValueCount(Content);
Case(_NumVals-value>_NumVals;"|";
"|"& string.repeat ( string ; GetValue(content; _NumVals-value)) & visualiseNumbers(content;string;value-1)
)
)
// ===================================
/*
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/219
Prototype: visualiseNumbers( content; string; value )
Function Author: TimA (http://www.fmfunctions.com/mid/102)
Last updated: 01 May 2009
Version: 1
*/
// ===================================
/*__LITBR____LITBR__Name:__LITBR__visualiseNumbers__LITBR____LITBR__History:__LITBR__Created by Tim Anderson, Tim Anderson Group__LITBR__www.timanderson.co.uk__LITBR__Creation Date: 29 April 2009__LITBR____LITBR__ __LITBR__Purpose: __LITBR__To convert a list of numbers into a text line of characters defined by the numbers __LITBR____LITBR__Parameters: __LITBR__Content__LITBR__string__LITBR__value__LITBR__ __LITBR__Example: __LITBR__visualiseNumbers ( "5¶4¶5¶8" ; "x" ; 3 ) gives |xxxxx|xxxx|xxxxx|xxxxxxxx|__LITBR____LITBR____LITBR__ __LITBR____LITBR__Requires Other Custom Functions:__LITBR__string.repeat(str;number)__LITBR__If (number > 0 ;__LITBR__str & If ( number > 1 ; string.repeat ( str ; number - 1) ; "")__LITBR____LITBR__Other Notes:__LITBR__The value must always be the number of values-1. __LITBR____LITBR__Options:__LITBR__None__LITBR__*/__LITBR__// visualiseNumbers( Content ; string; value)__LITBR____LITBR__Let(_NumVals=ValueCount(Content);__LITBR____LITBR__Case(_NumVals-value>_NumVals;"|";__LITBR____LITBR__ "|"& string.repeat ( string ; GetValue(content; _NumVals-value)) & visualiseNumbers(content;string;value-1)__LITBR____LITBR____LITBR____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/219__LITBR____LITBR__ Prototype: visualiseNumbers( content; string; value )__LITBR__ Function Author: TimA (http://www.fmfunctions.com/mid/102)__LITBR__ Last updated: 01 May 2009__LITBR__ Version: 1__LITBR____LITBR__*/__LITBR__// ===================================
Login or register to comment
Create a new account with fmcustomfunctions.com or login to post a comment.