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:
- Cell
- Paragraph
- Table Column
- Table Row
- Table
- Document
Example
CUSTPROP("Property 1", <"scope">)
The list below shows the cases (for "scope")
Paragraph:
- Missing or "P" ==> get the named custom property of the paragraph
- "TR" ==> get the named custom property of the table row this paragraph is on if this paragraph is in a table
- "TC" ==> get the named custom property of the table column this paragraph is in if this paragraph is in a table
- "T" get the named custom property of the table this paragraph is in if this paragraph is in a table
- "D" get the named custom property set in the document settings.
Table Row:
- Missing or "TR" ==> get the named custom property of the table row
- "T" ==> get the named custom property of the table
Table Column:
- Missing or "TC" ==> get the named custom property of the table column
- "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.