Brian Dunning's FileMaker Custom Functions

simpleCalcSpanishDNILetter ( dni )

Simplified function for calculating the letter of a Spanish national identity document

  Be the first to rate this function Log in to vote

Alejandro Abadia Fandos   Alejandro Abadia Fandos - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
simpleCalcSpanishDNILetter (1345684T) ; simpleCalcSpanishDNILetter (1345684)
  Sample output:
T

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

This function calculates the letter of a Spanish national identification document in the simplest possible way.

The function only delivers the correct letter.

It does not take into account if a letter has already been entered, i.e. it does not make comparisons between the entered letter and the correct one, nor if special characters such as hyphens have been entered as they are filtered out.
It also intentionally does not check whether the length of the number is correct (8 characters).

 

Comments

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: