> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/administration-and-setup/settings/global-settings/document-types/script/scripting-in-docbits/functions.md).

# Functions

The scripting functions documentation has been reorganized into focused categories for easier navigation.

## Function Categories

### [Field Functions](/administration-and-setup/settings/global-settings/document-types/script/scripting-in-docbits/field-functions.md)

Read, write, and control document fields — `get_field_value()`, `set_field_value()`, `set_date_value()`, `set_amount_value()`, `set_field_as_invalid()`, `set_is_required()`, `set_is_hidden()`, `set_is_readonly()`, and more.

### [Table Functions](/administration-and-setup/settings/global-settings/document-types/script/scripting-in-docbits/table-functions.md)

Read, write, and manipulate tables and table rows — `get_column_value()`, `set_column_value()`, `add_table_column()`, `remove_rows_from_table()`, `delete_tables()`, and more.

### [Business Logic Functions](/administration-and-setup/settings/global-settings/document-types/script/scripting-in-docbits/business-logic-functions.md)

Lookups, PO matching, tasks, user/group management, and status changes — `get_lookup_records()`, `auto_po_match_for_purchase_orders()`, `get_next_sequence_number()`, `create_document_task()`, `get_group_by_name()`, and more.

### [Utility Functions](/administration-and-setup/settings/global-settings/document-types/script/scripting-in-docbits/utility-functions.md)

Python built-ins, string operations, math, regex, date/time, and data structures — `re_search()`, `strptime()`, `levenshtein_distance()`, `parse_decimal()`, and more.

### [Fulltext & Vector Search Functions](/administration-and-setup/settings/global-settings/document-types/script/scripting-in-docbits/fulltext-search-functions.md)

Search document archives, find similar documents, and query ERP master data — `fulltext_search()`, `vector_search()`, `fulltext_search_erp()`, `fulltext_suggestions()`. **Available from version 11.48.0**, requires `OPENSEARCH_ENABLED` license.

## Quick Reference

| Category           | Key Functions                                                                                                                                                                   |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Fields**         | `get_field_value`, `set_field_value`, `set_date_value`, `set_amount_value`, `set_field_as_invalid`, `set_field_as_valid`, `set_is_required`, `set_is_readonly`, `set_is_hidden` |
| **Tables**         | `get_column_value`, `set_column_value`, `set_column_date_value`, `set_column_amount_value`, `add_table_column`, `remove_rows_from_table`                                        |
| **Business Logic** | `get_lookup_records`, `auto_po_match_for_purchase_orders`, `get_next_sequence_number`, `create_document_task`, `update_document_status_with_doc_id`, `get_group_by_name`        |
| **Search**         | `fulltext_search`, `vector_search`, `fulltext_search_erp`, `fulltext_suggestions`                                                                                               |
| **Utility**        | `re_search`, `re_sub`, `re_findall`, `strptime`, `strftime`, `levenshtein_distance`, `parse_decimal`, `deepcopy`                                                                |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.docbits.com/administration-and-setup/settings/global-settings/document-types/script/scripting-in-docbits/functions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
