Brian Dunning's FileMaker Custom Functions

GetMinorVersion ( string )

Returns Patch and Minor application version numbers by filtering out all non-numeric characters and truncating version integer.

  Average rating: 5.0 (1 vote) Log in to vote

Julio Toledo   Julio Toledo - Show more from this author
Automation USA LLC
https://www.automationusa.net

Share on Facebook Share on Twitter

  Sample input:
GetMinorVersion ( $$MODULE.VERSION )
GetMinorVersion ( Get ( HostApplicationVersion ) )
GetMinorVersion ( GetSystemPlatformVersion )
GetMinorVersion ( Get ( WindowName ) )
  Sample output:
returns ".0.1" when $$MODULE.VERSION = "Version 1.0.1"
returns ".0.4" when Get ( HostApplicationVersion ) = "Server 16.0.4"
returns ".14.2" when GetSystemPlatformVersion = "macOS 10.14.2"
returns ".0.3" when window name = "My_App_1_0_3"

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

This custom function is intended to evaluate file names, server application version, API versions, global variables, window names, or any other string you throw at it and return Patch and Minor application version numbers (as string).

Accepts a single string as parameter. Defaults to "Get ( ApplicationVersion )" function.

Normalizes various non-normal methods of semantic versioning ( https://semver.org ), including use of non-standard separators such as underscore "_", hyphen "-", and comma ","

Examples:
GetMinorVersion ( "" )
returns ".0.3" when Get ( ApplicationVersion ) = "ProAdvanced 17.0.3"

GetMinorVersion ( Get ( HostApplicationVersion ) ) returns ".0.4" when Get ( HostApplicationVersion ) = "Server 16.0.4"

GetMinorVersion ( $$MODULE.VERSION ) returns ".0.1" when $$MODULE.VERSION = "Version 1.0.1"

GetMinorVersion ( Get ( WindowName ) ) returns ".0.3" when window name = "My_App_1_0_3"

GetMinorVersion ( GetSystemPlatformVersion ) returns ".14.2 when GetSystemPlatformVersion = "macOS 10.14.2"

GetMinorVersion ( Get ( FileName ) ) returns ".0.3.5" when Get ( FileName ) = "My_App_0-0-3-5"

GetMinorVersion ( Get ( FileName ) ) returns ".1.3.5" when Get ( FileName ) = "My-App-2,1,3,5"

Returns "N/A" as default

 

Comments

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.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: