February FileMaker Functions - Exact

The Exact function compares the contents of two fields. If they are an exact match, the function returns 1 (true), otherwise it returns 0 (false). For an exact match or text, each must have the same upper and lower case. For example, cat does not match Cat. The Exact function does not consider text formatting such as size, font or style.

    Exact ( originalText; comparisonText )
  • Input: text
  • Output: Boolean number (0 or 1)

Examples of Use

1. Comparing New Password Entries

When a user enters a new password that will be case sensitive, it is important that they are aware that case is important. When setting a new password, the user will usually be asked to enter their new password twice to ensure they type it the same way. The system needs to check that the two new passwords entered are exactly the same. So we can use:

Exact ( newPassword1; newPassword2 )

This may be used as the Exit Loop If condition for a Loop in a script - until it returns true, the user will be kept in a loop where they are asked to enter matching new passwords. Of course, this would be used in conjunction with other conditions such as a minimum password length and combination of characters.

2. Check for Case Usage

The Exact function can be used to test whether exclusively upper or lower case characters have been entered. Using this expression:

Exact ( codeField; Upper ( codeField ) )

we can test whether the data in codeField is all uppercase. If it is, the function returns 1.

Leave a Reply

You must be logged in to post a comment.