CommunicationStructuree ( )

Function stats

Average user rating
37
321
9999
Support
FileMaker 7.0 +
Date posted
15 February 2012
Last updated
09 September 2015
Version
Recursive function
No

Author Info
 Fabrice

74 functions

Average Rating 4.4

author_avatar



 

Function overview

Prototype

CommunicationStructuree  ( _char10 )


Parameters

_char10  a 10 char long numeric string


Description

Tags:  Format  

BELGIAN payment reference system

Examples

Sample input

CommunicationStructuree ( 1013274810 )


Sample output

101/3274/81006

 

Function code

/*
CommunicationStructuree ( _char10 )

BELGIAN payment reference system

by Fabrice Nordmann,
1-more-thing

http://www.1-more-thing.com
http://www.twitter.com/1morethingtweet

_char10 : a 10 char long numeric string

sample input: 1234567890
sample output: 123/4567/89002 (formatted with / and appended the validation key, 02)

v2 - sept 2015: now it works :)

*/

Let ([
_input = _char10 ;
_s = Left ( Filter ( _input ; "0123456789" ) & "0000000000" ; 10 );
_k = Right ( "00" & Mod ( _s ; 97 ) ; 2 )
];
Left ( _s ; 3 ) & "/" & Middle ( _s ; 4 ; 4 ) & "/" & Right ( _s ; 3 ) & _k
)

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

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

    Prototype: CommunicationStructuree( _char10 )
    Function Author: Fabrice (http://www.fmfunctions.com/mid/37)
    Last updated: 09 September 2015
    Version: 2.1

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

 

Comments

Andries Heylen
08 January 2014



are you sure that you need the last "/" (between number and check?)
  General comment
Fabrice
08 January 2014



/ and - are not mandatory. Some banks display them, some don't. If you happen to communicate with an external system like Isabel, you can simply remove them.
  General comment

 

 

 

 

 

Top Tags

Text Parsing  (33)
List  (31)
Date  (28)
XML  (26)
Format  (23)
Sql  (22)
Dev  (20)
Debug  (17)
Interface  (15)
Layout  (15)
Text  (14)
Variables  (12)
Layout Objects  (11)
Filter  (11)
Design  (10)
Array  (7)