Brian Dunning's FileMaker Custom Functions

IsIP ( IP )

Checks if string entered is an IP address, returns true or false

  Average rating: 4.4 (31 votes) Log in to vote

Hartger Visser   Hartger Visser
Teuker Small Business Solutions
http://www.teuker.nl

Share on Facebook Share on Twitter

  Sample input:
IsIP (192.168.1.1)
  Sample output:
true

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Checks wether the values between the "." are between 0 and 255 (including zero, excluding 255).
Also checks if there are 3 periods in the tring.

 

Comments

Tim Cimbura   Tim Cimbura, LuminFire
Apr 29, 2011
I'm not sure this function works. The parsing of the 3rd argument is not correct and should be

GetAsNumber ( Middle ( $IP ; Position ( $IP ; "." ; 1 ; 2 ) + 1 ; Position ( $IP ; "." ; 1 ; 3 ) - Position ( $IP ; "." ; 1 ; 2 ) -1 ) )
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.