CUSTPROP Function

The CUSTPROP function returns the custom property specified by "name". The argument "scope" is optional, which is used to determine the searching level. For instance, for a table row object, a user can specify whether to get the custom property from the table row or from the table.

Syntax

CUSTPROP("name", <"scope">)

Where

Name specifies the custom property label to return.

Note: This value is case-sensitive, allowing for both custom properties AAA and aaa to exist.

Scope can be any of the following values:

  • C - Cell

  • P - Paragraph

  • T - Table

  • TR - Row

  • TC - Column

  • D - Document Settings

  • SSK - This is the smallest section with a Knowledge Library Link that encompasses the object containing the calculation (easiest to think of a paragraph).

  • SSL - This is the smallest section with a Label that encompasses the object containing the calculation.

Notes

  • Without a specified parameter type, the CUSTPROP() function will check for and use properties from the following items in order:
    1. Cell
    2. Paragraph
    3. Table Column
    4. Table Row
    5. Table
    6. Document

Example

CUSTPROP("Property 1", <"scope">)

The list below shows the cases (for "scope")

Paragraph:

  1. Missing or "P" ==> get the named custom property of the paragraph
  2. "TR" ==> get the named custom property of the table row this paragraph is on if this paragraph is in a table
  3. "TC" ==> get the named custom property of the table column this paragraph is in if this paragraph is in a table
  4. "T" get the named custom property of the table this paragraph is in if this paragraph is in a table
  5. "D" get the named custom property set in the document settings.

Table Row:

  1. Missing or "TR" ==> get the named custom property of the table row
  2. "T" ==> get the named custom property of the table

Table Column:

  1. Missing or "TC" ==> get the named custom property of the table column
  2. "T" ==> get the named custom property of the table

Notes

  • A blank string is returned if the function cannot find a match.
  • The "name" parameter can be a calculation if the custom property retrieved is a text property. If the source custom property is a calculated property, CUSTPROP can only evaluate its correct value if the name parameter is a constant string.

Related Topics