# Datastructure plugin reference

**URL:** <https://community.novulo.com/t/datastructure-plugin-reference/759>\
**Category:** Wiki\
**Tags:** plugin\
**Created:** [July 10, 2025, 7:57am UTC](https://community.novulo.com/t/datastructure-plugin-reference/759 "2025-07-10T07:57:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Helena](https://avatars.discourse-cdn.com/v4/letter/h/c68b51/32.png) [@Helena](https://community.novulo.com/u/Helena)\
**Post date:** [July 10, 2025, 7:57am UTC](https://community.novulo.com/t/datastructure-plugin-reference/759/1 "2025-07-10T07:57:58Z")

</div>

# Novulo Data Structure Functions Reference

A complete guide to all built-in, read-only functions for Novulo data structures. Click any item to jump directly to its definition.

Contents

- **Field-related Functions**
  - [DS\_FieldIsFunction](#DS_FieldIsFunction)
  - [DS\_FieldHasParameters](#DS_FieldHasParameters)
  - [DS\_FieldTitle](#DS_FieldTitle)
  - [DS\_FieldRecordType](#DS_FieldRecordType)
  - [DS\_FieldFieldType](#DS_FieldFieldType)
  - [DS\_FieldIdFunction](#DS_FieldIdFunction)
  - [DS\_FieldNameFunction](#DS_FieldNameFunction)
  - [DS\_FieldThisFunction](#DS_FieldThisFunction)
  - [DS\_FieldDisplayValue](#DS_FieldDisplayValue)

- **Type-related Functions**
  - [DS\_TypeIsNovuloType](#DS_TypeIsNovuloType)
  - [DS\_TypeIsDb](#DS_TypeIsDb)
  - [DS\_TypeTitle](#DS_TypeTitle)
  - [DS\_TypeIsPrimitive](#DS_TypeIsPrimitive)
  - [DS\_TypeIsFile](#DS_TypeIsFile)
  - [DS\_TypeIsIdDescription](#DS_TypeIsIdDescription)
  - [DS\_TypeIsRecord](#DS_TypeIsRecord)
  - [DS\_TypeThis](#DS_TypeThis)
  - [DS\_TypeId](#DS_TypeId)
  - [DS\_TypeModelName](#DS_TypeModelName)
  - [DS\_TypeFields](#DS_TypeFields)
  - [DS\_TypeDisplayValue](#DS_TypeDisplayValue)

- **Enumeration-related Functions**
  - [DS\_EnumTargetValue](#DS_EnumTargetValue)

## Field-related Functions

### DS\_FieldIsFunction `(field_is_function)`

Return Type  
`boolean`  
Parameters  
`fieldName: string` - include `()` if function.  
Examples  
`boolean:field_is_function("contacts.contact_name()")` → `true`  
`boolean:field_is_function("contacts.contact_name")` → `false`  
Description  
Returns `true` when the field is a calculated function rather than a stored attribute.

### DS\_FieldHasParameters `(field_has_parameters)`

Return Type  
`boolean`  
Parameters  
`fieldName: string`.  
Example  
`boolean:field_has_parameters("contacts.id")` → `false`  
Description  
Indicates whether a function-field requires parameters.

### DS\_FieldTitle `(field_title)`

Return Type  
`string`  
Parameters  
`fieldName: string`.  
Example  
`string:field_title("contacts.contact_name")` → `"contact_name"`  
Description  
Human-readable label of the field, with translations applied.

### DS\_FieldRecordType `(field_recordtype)`

Return Type  
`string`  
Parameters  
`fieldName: string`.  
Example  
`string:field_recordtype("contacts.contact_name")` →  
`"contacts~n_contact#a1f1fca8-cb11-4c1b-88c8-09d5e30e4940"`  
Description  
Internal record-type identifier that owns the field.

### DS\_FieldFieldType `(field_fieldtype)`

Return Type  
`string`  
Parameters  
`fieldName: string`.  
Example  
`string:field_fieldtype("contacts.contact_name")` → `novulodatastructuretypes:load("string")`  
Description  
Reference to the data-structure type of the field.

### DS\_FieldIdFunction `(field_id)`

Return Type  
`string`  
Parameters  
`fieldName: string`.  
Example  
`string:field_id("contacts.contact_name")` →  
`"contacts~n_contact#a1f1fca8-cb11-4c1b-88c8-09d5e30e4940.contact_name"`  
Description  
Internal UUID of the field in the repository.

### DS\_FieldNameFunction `(field_fieldname)`

Return Type  
`string`  
Parameters  
`fieldName: string`.  
Example  
`string:field_fieldname("contacts.contact_name")` → `"contact_name"`  
Description  
Strips any record-type prefix, isolating the field name.

### DS\_FieldThisFunction `(field_this)`

Return Type  
`string`  
Parameters  
`fieldName: string`.  
Example  
`string:field_this("contacts.contact_name")` → `novulodatastructurefields:load("contacts.contact_name")`  
Description  
Contextual self-reference to the field for record-scoped expressions.

### DS\_FieldDisplayValue `(field_displayvalue)`

Return Type  
`string`  
Parameters  
`fieldName: string`.  
Example  
`string:field_displayvalue("contacts.contact_name")` → `"contact_name (contact_name)"`  
Description  
Combines field name and label for display or logging.

## Type-related Functions

### DS\_TypeIsNovuloType `(type_is_novulo_type)`

Return Type  
`boolean`  
Parameters  
`typeName: string`.  
Example  
`boolean:type_is_novulo_type("contacts")` → `true`  
Description  
True when the type is modelled inside your Novulo domain.

### DS\_TypeIsDb `(type_is_db)`

Return Type  
`boolean`  
Parameters  
`typeName: string`.  
Example  
`boolean:type_is_db("contacts")` → `true`  
Description  
Indicates that instances are stored in the database.

### DS\_TypeTitle `(type_title)`

Return Type  
`string`  
Parameters  
`typeName: string`.  
Example  
`string:type_title("contacts")` → `"Contacts"`  
Description  
Human-readable title of the type.

### DS\_TypeIsPrimitive `(type_is_primitive)`

Return Type  
`boolean`  
Parameters  
`typeName: string`.  
Example  
`boolean:type_is_primitive("string")` → `true`  
Description  
True for scalar types such as string, integer, boolean, etc.

### DS\_TypeIsFile `(type_is_file)`

Return Type  
`boolean`  
Parameters  
`dataType: DataStructureType`.  
Examples  
`boolean:type_is_file(novulodatastructuretypes:load("file"))` → `true`  
`boolean:type_is_file(novulodatastructuretypes:load(string:type_id("file")))` → `true`  
Description  
True when the type’s `IsFile` flag is set.

### DS\_TypeIsIdDescription `(type_is_id_description)`

Return Type  
`boolean`  
Parameters  
`dataType: DataStructureType`.  
Example  
`boolean:type_is_id_description(novulodatastructuretypes:load("yesno"))` → `true`  
Description  
True when the type’s `IsIdDescription` flag is set.

### DS\_TypeIsRecord `(type_is_record)`

Return Type  
`boolean`  
Parameters  
`typeName: string`.  
Example  
`boolean:type_is_record("contacts")` → `true`  
Description  
True when the type is a structured record rather than a primitive.

### DS\_TypeThis `(type_this)`

Return Type  
`DataStructureType`  
Parameters  
`typeName: string`.  
Example  
`string:type_this("contacts")` → `novulodatastructuretypes:load("contacts")`  
Description  
Converts its argument to a `DataStructureType` object.

### DS\_TypeId `(type_id)`

Return Type  
`string`  
Parameters  
`typeName: string`.  
Example  
`string:type_id("contacts")` → `"contacts~n_contact#a1f1fca8-cb11-4c1b-88c8-09d5e30e4940"`  
Description  
Internal UUID of the type.

### DS\_TypeModelName `(type_modelname)`

Return Type  
`string`  
Parameters  
`typeName: string`.  
Example  
`string:type_modelname("contacts")` → `"contacts"`  
Description  
Logical module name in which the type is defined.

### DS\_TypeFields `(type_fields)`

Return Type  
`List<string>`  
Parameters  
`typeId: string` (use `type_id()` or `novulodatastructuretypes:load()`).  
Example  
`string:type_fields(string:type_id("contacts"))` → `["contact_name","phone","email",…]`  
Description  
Returns every field code belonging to that record type.

### DS\_TypeDisplayValue `(type_displayvalue)`

Return Type  
`string`  
Parameters  
`typeName: string`.  
Example  
`string:type_displayvalue("contacts")` → `"Contacts (contacts)"`  
Description  
Formatted display value combining the type title and context.

## Enumeration-related Functions

### DS\_EnumTargetValue `(enum_targetvalue)`

Return Type  
`string`  
Parameters  
`enumKey: string` – e.g. `"yesno:1"`.  
Example  
`string:enum_targetvalue("yesno:1")` → `"yes"`  
Description  
Resolves the display value (yes/no, active/inactive) for an enumeration key.

**Usage Notes:**

- Always prefix calls with the expected return type (e.g. `boolean:`, `string:`).
- Parameters are string literals—keep the quotes.
- All functions are read-only; they never alter the model, making them safe for UI conditions, validations, and health checks.
