The Original Filemaker Community - Forum
FileMaker News | FileMaker Tutorials | FileMaker Videos

Password protection and security…

How and Why to Use Name Constants in FileMaker

Interestingly, the numbers used appear to be an 8-bit safe number sequence, which makes perfect sense in a programming language. You can see some interesting results using the Data Viewer if you have the Advanced Tools enabled in your copy of FileMaker Pro 17 or are running an Advanced version of FileMaker Pro by seeing the result of the following calculations:

Bold + Underline
result: 1,280

You could also use the value interchangeably such as in the JSON functions, for example:

JSONSetElement ( $json ; "name" ; "Mike" ; 1 )

is equivalent to writing:

JSONSetElement ( $json ; "name" ; "Mike" ; JSONString )

That being said, I do NOT recommend replacing the named constant with their corresponding value. While these are unlikely to change in future versions, as a matter of best practice I would always use the named constant, as recommended in the official documentation. I have occasionally seen, especially in the case of JSON functions, values used in place of their named constant.

Using named constants makes programming code self-evident as well as easier to understand and read. Rather than memorizing an obscure set of numbers, you can use names to reference what those numbers are.

References

On this site we promote, share and showcase material from Soliant Consulting one of the BEST consulting company’s in FileMaker.

We encourage you to visit their site and to inquire about their services. FMT is proud to deliver and promote FileMaker for Small Business Owners Worldwide since 1997. Our Forum The Original FileMaker Forum has 45,700+ members.

Comments are closed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Privacy & Cookies Policy