# Getting the Version number

**URL:** https://the.fmsoup.org/t/getting-the-version-number/4988
**Category:** Heads-Up!
**Tags:** get-functions
**Created:** [August 6, 2025, 9:15pm UTC](https://the.fmsoup.org/t/getting-the-version-number/4988 "2025-08-06T21:15:32Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)
#### Post date: [August 6, 2025, 9:15pm UTC](https://the.fmsoup.org/t/getting-the-version-number/4988/1 "2025-08-06T21:15:32Z")

</div>

`Get ( ApplicationVersion )` is the most obvious way to get the application version when you need to sniff out whether the user has the ability to use the latest feature or whether they should be warned about changes.

The gotcha is that the function returns locale specific information. My install is using New Zealand English and returns `Pro 22.0.1` .

Also, the function returns the name of the client application and the version number. That is literally what the name says, so that’s ok. When you just want the version you’ll need to use `Rightwords ( Get ( ApplicationVersion ) ; 1 )` . For me that returns `22.0.1`.

It would be nice to use Greater Than or Less Than to easily test the version but the version is not a number, it’s a string, so we have to split it into components and test each component.

```auto
Let( [
 // sep = JSONGetElement ( Get ( FileLocaleElements ) ; "Num.Decimal" )
    sep = "."
  ; ver = RightWords ( Get ( ApplicationVersion ) ; 1 )
  ; splitver = Substitute ( ver ; sep ; ¶ )
  ] ; 
  GetValue ( splitver ; 1 ) = "22" and 
  GetValue ( splitver ; 2 ) = "0" and 
  GetValue ( splitver ; 3 ) = "1")
)

```

We could make that into a Custom Function called `GetVersionPart` and return the component we want to query, such as `GetVersionPart[1]`.

```auto
/*
Returns the version part as a number 
-- parameter: partnumber, must be in range 1 .. 3
*/
Let( [
  // sep = JSONGetElement ( Get ( FileLocaleElements ) ; "Num.Decimal" )
    sep = "."
  ; ver = RightWords ( Get ( ApplicationVersion ) ; 1 )
  ; splitver = Substitute ( ver ; sep ; ¶ )
  ] ; 
  if ( partnumber ≥ 1 and partnumber ≤ 3 ; GetAsNumber( GetValue ( splitver ; partnumber ) ) )
)

```

That’s nice, now we can say,`GetVersionPart[1] ≤ 22` or `GetVersionPart[1] = 22 and GetVersionPart[2] = 0`. That’s very flexible and gives us data in a form that is easy to use.

Now, imagine for a second, that we didn’t need to write the custom function to get the version and Claris had built a function to do that for us. That would be great!

Now, imagine that Claris has built the function, and forgotten to document it.

`Get ( DBEngineVersion ) /* returns 220010068 for FileMaker Pro version 22.0.1.68 */`

---

<div class="post-metadata">

### Author: ![FabriceN](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/fabricen/32/2506_2.png) [@FabriceN](https://the.fmsoup.org/u/FabriceN)
#### Post date: [August 7, 2025, 7:38am UTC](https://the.fmsoup.org/t/getting-the-version-number/4988/2 "2025-08-07T07:38:47Z")

</div>

haha. The Master of Suspense! 🙂

Very cool finding! How did you find out about it?

Thanks

---

<div class="post-metadata">

### Author: ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)
#### Post date: [August 7, 2025, 8:48am UTC](https://the.fmsoup.org/t/getting-the-version-number/4988/3 "2025-08-07T08:48:40Z")

</div>

Our lead dev was asking us how to trap for the version number. We all came back with suggestions like the ones above, but he kept saying, no, no, no, I want the function that just returns the number!

He had got it from a conversation with one of the Claris devs, but had forgotten it. Fortunately we located it by searching our DDR repo.

---

<div class="post-metadata">

### Author: ![AndyHibbs](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/andyhibbs/32/3089_2.png) [@AndyHibbs](https://the.fmsoup.org/u/AndyHibbs)
#### Post date: [August 7, 2025, 3:49pm UTC](https://the.fmsoup.org/t/getting-the-version-number/4988/4 "2025-08-07T15:49:05Z")

</div>

If all you need is the major version, use Int ( Get (ApplicationVersion))

---

<div class="post-metadata">

### Author: ![FabriceN](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/fabricen/32/2506_2.png) [@FabriceN](https://the.fmsoup.org/u/FabriceN)
#### Post date: [August 7, 2025, 5:02pm UTC](https://the.fmsoup.org/t/getting-the-version-number/4988/5 "2025-08-07T17:02:06Z")

</div>

that’s if you’re using the period as a decimal separator. Doesn’t work for every file.

---

<div class="post-metadata">

### Author: ![jwilling](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/jwilling/32/256_2.png) [@jwilling](https://the.fmsoup.org/u/jwilling)
#### Post date: [August 7, 2025, 5:07pm UTC](https://the.fmsoup.org/t/getting-the-version-number/4988/6 "2025-08-07T17:07:00Z")

</div>

This is super duper cool, thanks. Makes you wonder what else is lurking under the hood.

Quick note about this:

> [@Malcolm](#):
>
> ```auto
> JSONGetElement ( Get ( FileLocaleElements ) ; "Num.Decimal" )
> 
> ```

I think the separator in the file locale elements could differ from what is used in `Get(ApplicationVersion)`, so it’s a good idea to parse out the separator from `Get(ApplicationVersion)`directly. E.g. one way:

```auto
Let ([
	~av = Get ( ApplicationVersion ) ;
	~version = Middle ( ~av ; Position ( ~av ; " " ; 1 ; 1 ) + 1 ; length ( ~av ) ) ;
	~sep = left ( substitute ( ~version ; [0;""] ; [1;""] ; [2;""] ; [3;""] ; [4;""] ; [5;""] ; [6;""] ; [7;""] ; [8;""] ; [9;""] ) ; 1 ) ;
	~av_list = substitute ( ~version ; ~sep ; ¶ ) ;
	~maj = GetValue ( ~av_list ; 1 ) ;
	~min = GetValue ( ~av_list ; 2 ) ;
	~patch = GetValue ( ~av_list ; 3 )
];
	// use ~maj/~min/~patch
)

```

---

<div class="post-metadata">

### Author: ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)
#### Post date: [August 7, 2025, 8:32pm UTC](https://the.fmsoup.org/t/getting-the-version-number/4988/7 "2025-08-07T20:32:09Z")

</div>

> [@jwilling](#):
>
> I think the separator in the file locale elements could differ from what is used in `Get(ApplicationVersion)`

Maybe someone here can confirm. @FabriceN ?

---

<div class="post-metadata">

### Author: ![bdbd](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/bdbd/32/620_2.png) [@bdbd](https://the.fmsoup.org/u/bdbd)
#### Post date: [August 7, 2025, 11:34pm UTC](https://the.fmsoup.org/t/getting-the-version-number/4988/8 "2025-08-07T23:34:02Z")

</div>

I confirm that Get (ApplicationVersion) always uses periods as separators regardless of locale.

---

<div class="post-metadata">

### Author: ![planteg](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/planteg/32/627_2.png) [@planteg](https://the.fmsoup.org/u/planteg)
#### Post date: [August 8, 2025, 3:50am UTC](https://the.fmsoup.org/t/getting-the-version-number/4988/9 "2025-08-08T03:50:11Z")

</div>

Don’t tell Claris, someone may think it’s a bug and ask to correct that 😃 .

---

<div class="post-metadata">

### Author: ![tonywhitelive](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/tonywhitelive/32/208_2.png) [@tonywhitelive](https://the.fmsoup.org/u/tonywhitelive)
#### Post date: [August 9, 2025, 2:58pm UTC](https://the.fmsoup.org/t/getting-the-version-number/4988/10 "2025-08-09T14:58:54Z")

</div>

There are a number of reasons to use Get ( ApplicationVersion ), including:

[1] Checking that the client software is running a high enough version to use a feature

[2] Check that the version is OK or should upgrade by providing lists of:

$applicationVersion\_is\_OK\_list

$applicationVersion\_should\_upgrade\_list

// blog post for another day

@bdbd and others in the community have reported that the numeric portion of the text string returned by Get ( ApplicationVersion ) is dot delimited in {most likely} all languages/locals.

On the other hand, different languages/locals use different characters to delimit the integer part and the decimal places of a number.

Both Int ( "22.0.1" ) and GetAsNumber ( "22.0.1" ) seem to make use of the first delimiter and remove the later one(s), returning 22 and 22.01 respectively.

This works well as a method of returning the major portion of the ApplicationVersion only if the languages/locals uses a dot charter to delimit the integer part and the decimal places of a number

It is also important to note that checking for only the major release part is not as robust as parsing major.minor.patch out and checking for major, minor, and patch. For example you might be checking for features released in 19.6.1

> **[ClarisPKB](https://support.claris.com/s/article/Claris-FileMaker-Pro-19-6-1-Release-Notes?language=en_US)**

Happy FileMaker’ing to all our friends working in...

// might have errors here ↴

English // 123.45

French // 123,45

German // 123,45

Italian // 123,45

Dutch // 123,45

Spanish // 123,45

Swedish // 123,45

Japanese // QQQ

Brazilian-Portuguese // 123,45

Korean and Simplified // QQQ

…languages!

---

<div class="post-metadata">

### Author: ![jwilling](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/jwilling/32/256_2.png) [@jwilling](https://the.fmsoup.org/u/jwilling)
#### Post date: [August 10, 2025, 8:44pm UTC](https://the.fmsoup.org/t/getting-the-version-number/4988/11 "2025-08-10T20:44:56Z")

</div>

Thanks for confirming @bdbd🙂

---

<div class="post-metadata">

### Author: ![FabriceN](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/fabricen/32/2506_2.png) [@FabriceN](https://the.fmsoup.org/u/FabriceN)
#### Post date: [August 14, 2025, 5:53am UTC](https://the.fmsoup.org/t/getting-the-version-number/4988/12 "2025-08-14T05:53:31Z")

</div>

Get ( ApplicationVersion ) returns a constant string, with dots.  
You can get the decimal separator of a file by either looking a the locale (Get ( FileLocaleElements )), or simply by parsing a decimal number: Middle ( 3/2 ; 2 ; 1 )
