Brian Dunning's FileMaker Custom Functions

StateAcronym_Mex ( State )

Returns the three letter acronym for each Mexican state.

  Average rating: 4.2 (29 votes) Log in to vote

Ibrahim Bittar Torres   Ibrahim Bittar Torres - Show more from this author
Eikonsys, S.A. de C.V.
http://www.eikonsys.com

Share on Facebook Share on Twitter

  Sample input:
StateAcronym_Mex ( "Puebla" )
  Sample output:
PUE

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This function is very handy if you are in México or are doing something for a Mexican company. This will return the short name for each Mexican state, which can be useful to construct addresses or in electronic invoicing.

 

Comments

Lee Smith   Lee Smith
Aug 23, 2014
Your custom function did not work out of the box.

Your parameter shows as “tateAcronym_Me”, and it yet it requires a field “State” I do not see the purpose of tateAcronym_Me. When I made a test file, I had to create both fields but only the state was needed.

Perhaps a better explanation on how to set up the custom function in a file would help the reader in the future.
 
Ibrahim Bittar   Ibrahim Bittar, León, México
Aug 23, 2014
Hi Lee

With all due respect, you don't see the purpose because you're not Mexican :) (tongue in cheek here).

Let me explain:

In Mexico we use full names for states, for example, in an address we use "Guanajuato" instead of "GTO", as opposed as in the US where everybody uses the acronym.

This function was created with Mexican developers in mind, because we sometimes need the short name of a state and all we have is the long name. With this function we can have both without having to write the looooong case statement every time.

I hope you now see the purpose...

Best regards.
 
unix   unix, Japan
Aug 25, 2014
You need to write function name as
StateAcronym_Mex ( State )
since State may be parameter, not field name.
 
Ibrahim Bittar Torres   Ibrahim Bittar Torres, Eikonsys, S.A. de C.V.
Aug 25, 2014
Hi Unix

Thank you very much for noticing this. It has been corrected.
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: