FMP 16.02 Windows x64
FMS 15.03 Macos X 12...
The UniqueValues function was originated in FM 16
So I thought that a Case ( Get ( ApplicationVersion ) ) will suffice to run this on FMS as follows:
Let ( [
fmv = GetAsNumber ( Get ( ApplicationVersion ) )
; vals = "RED¶green¶red¶yellow¶"
; result =
fmv ≥ 16;
UniqueValues ( vals );
// UniqueValues ( vals; 1; "English" );
UniqueList ( vals; False ) // Custom Function
Not sure if this is the right way to prevent UniqueValues to run on the FMS 15.03 through PSOS, because result were all wrong and unexpected.
On FMP 16.02 all results of the 2 iterations of UniqueValues and UniqueList were correct
On FMS 15.03, with the Case function, wrong results and different results were returned, whether any of the 2 UniqueValues expressions in the examples were present.
Without the Case function, both UniqueValues expressions returned empty and UniqueList returned the correct value.
1) This looks like a bug to me.
The Case ( Get ( ApplicationVersion ) ) version should work as expected, and UniqueValues should be ignored when running on FMS 15.03, and return the correct result from the UniqueList Custom Function
2) Any comments on how to write calculations with functions that were originated in v16, and make the calculations backward (and forward) compatible, so it will use other functions for lower FM versions, would be appreciated.
PS: I did not test this on FMP < 16. Not sure if this wrong results are only on FMS < 16.