How to Recognize Characters in FileMaker Text

FileMaker provides a series of text functions for its calculation fields, which you can use to work with text stored in fields or variables. Some functions are designed to manually parse, or divide, text into smaller parts for analysis, while others automatically convert text into other value types. A set of any number of characters of text is called a "string" in FileMaker, and many other programming languages.

Instructions

    • 1

      Use the Middle function to extract a single character from a text field, if you know the location of the character in relation to the rest of the text. For example, the function "Middle(TextField,4,1)" will retrieve the letter "s" when TextField stores the text "This is a text field."

    • 2

      Use the Length function in a loop script step when you need to step through an entire string of text. For example, you can set the variable $CurrentCharacter to 1, and then increment this variable by 1 each time through the loop, exiting when "$CurrentCharacter = Length(TextField)".

    • 3

      Find a character or string of characters in a text field with the Position function. For example, "Position(TextField,'text',1,1)" will return the number 11 when TextField stores the example text above.

    • 4

      Count the number of times text appears in a string with the PatternCount function. "PatternCount(TextField,' ')" returns 4 in the example. A result of 0 shows that the search string does not occur in the text.

    • 5

      Convert text values to numbers, dates, times or timestamps respectively with the functions GetAsNumber, GetAsDate, GetAsTime and GetAsTimestamp. Each of these functions finds text within the field or variable which corresponds to the requested format, and returns that value in the desired type.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured