Kindly explain the below function:
getLayoutID ( Get ( LayoutName ) ) = 20
Thank you so much.
GetLayoutID is most likely a custom function similar to this:
FileMaker Custom Function:GetLayoutID ( layout )
GetLayoutName() is a built in function that gets the name of the currently in scope layout
FileMaker Pro 16 Help
If my assumption is correct the calculation returns true (1) if the currently in scope layout is number 20 and returns false(0) if not number 20.
coherentkris has it right.
Someone may be using this in a script or some other calculation to make sure that the current context is a specific layout. You use something like this instead of checking just the layout name so that a renaming of the layout won't break your script. For example, let's say the layout was named "My Cool Form" (and has the layout ID 20), and your script had a line:
If [ Get ( LayoutName ) = "My Cool Form" ] … do something
Later, someone might change the name of the layout to something more "professional" like "Data Entry Form" and then your script would no longer "do something."
Instead, by testing for getLayoutID ( Get ( LayoutName ) ) = 20, it doesn't matter what the current name of the layout is - that layout (if not deleted and rebuilt from scratch) will retain the internal ID of 20, and your script will always "do something" when the current context is on that layout.
Retrieving data ...