Vous êtes ici: Help Topics > Customization > Calculation > CUSTPROPR Function

CUSTPROPR Function

The CUSTPROPR function returns a custom property from a given range of custom properties. Custom properties returned using the CUSTPROPR() function are based on a fixed identifier with an appended variable postfix. The range specifies the number (and values) of available variable postfixes for the properties while the offset selects which variable postfix is to be used.

Syntax

CUSTPROPR("Fixed Identifier","Scope","Range","Offset")

Where

Fixed Identifier is the custom property label to which the automatically generated variable postfix will be added.

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.

Range is a formatted range declaration. The variable postfix will be selected from the available values specified by this range and conformed to the given offset. Range values are entered as two numbers or strings ordered smallest to largest, and separated by a double-dot. For example, "1..5", "C..H", and "Z..AD" are all valid range entries. CaseView increments through the available range of values in the same way table labels or cell numbers increment. That is, A-Z followed by AA, AB, AC, etc.

Offset specifies the variable postfix from the available range which should be appended to the fixed identifier.

Notes

  • Overly complex ranges such as a string of over 100 characters, or overly long range lists such as a range which results in more than 250 available variable postfix values will be ignored and cause the function to fail.
  • The range value must contain the double-dot (..) to be valid.
  • The fixed identifier, scope, and range values must be entered as static strings. A calculation to return a value for these components will not function correctly.
  • The offset may be a calculated value.
  • The fixed identifier and range values are not case-sensitive.

Example

Assume that cell C3 has a value of 2 and the paragraph has a custom property DEF2 whose value is 15.

CUSTPROPR("DEF","p","1..5",C3) would return the value 15.

The function searches for a paragraph property based on the scope. It appends the applicable variable postfixes to the fixed identifier DEF and returns a range of possible custom properties: DEF1, DEF2, DEF3, DEF4, and DEF5. The offset in this case is a calculated value (a cell number) and the function follows that reference to determine the offset is 2.

DEF2 is returned as the appropriate paragraph custom property, which has a value of 15.

Note: A blank string is returned if the function cannot find a match.

Related Topics