April 12, 201213 yr Hi I don't quite get how the 1 and 0 works in the case statement and how the if statement get the answer from the case statement. Can you help me to know how it works? Thanks. Regards, K.C. Let ([ vVersion = GetAsNumber ( Get ( ApplicationVersion ) ); vLowAccept = 11.01; vHighAccept = 11.99; vTest = Case ( vVersion < vLowAccept or vVersion > vHighAccept; 1; 0 ) ]; vTest )
April 12, 201213 yr I dont know what you are trying to do here but it seems as though you are just trying to test if its version 11. Why not just test for Int ( Get ( ApplicationVersion ) ) = 11 ?
April 15, 201213 yr Whoever wrote the calculation is using boolean values, where 1 is "true" and 0 is "false". So the Case statement checks to see if the ApplicationVersion is within the desired range, and if so returns 1/True but otherwise returns 0/False. Note that in FMP 11 and later (possibly earlier but I don't know) you can use "True" and "False" (but unquoted) instead of 1 and 0.
Create an account or sign in to comment