> For the complete documentation index, see [llms.txt](https://docs.documint.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.documint.me/~/changes/155/additional-resources/troubleshooting.md).

# Troubleshooting

This section provides solutions for common issues you might encounter while using the Documint app.

### Trouble with repeating elements

Looping over repeated elements is a common technical challenge users may face. We devote a whole section to troubleshooting in the [Repeating Elements](https://docs.documint.me/~/changes/155/templates/page-elements/repeating-elements.md) page.

### Text not appearing as it does in Airtable field

If text from your Airtable field is not appearing in your documents as it does in Airtable; for example, you have bulleted items or italic text, you can use the [`$md` formatter](https://docs.documint.me/~/changes/155/templates/data-and-variables/functions.md#md). The `$md` formatter uses [markdown](https://www.markdownguide.org/basic-syntax/) syntax to preserve some of the styling in your Airtable text fields. You can use it by adding the variable for your text into the formatter like so: `{{$md field_name}}`.

### Getting AUTHENTICATION\_REQUIRED error when trying to create documents from Airtable

{% hint style="info" %}
Airtable no longer uses API keys for API access. If you integrated in the past with an API key, you will need to replace it with a personal access token from Airtable.
{% endhint %}

This error is likely occurring because you have not provided a valid personal access token (PAT). Documint requires an Airtable PAT to access your data for document creation.

See [Add your Airtable Personal Access Token](https://docs.documint.me/~/changes/155/integrations/airtable/add-your-airtable-personal-access-token.md) on how you can create and add your Airtable PAT.&#x20;

If you have already provided a PAT and your integration has stopped working, try regenerating your PAT and adding it to your Documint integration. If that does not work, try creating a new one with the required scopes and adding that one instead.

If you are still getting a 401 AUTHORIZATION\_REQUIRED error, please contact Documint support.

### Sorting not working

There are two likely reasons why your list is not being sorted.

1. You have not provided a valid field to sort by.
2. The field you are sorting by is not the correct type.

First ensure that the field you are attempting to sort by exists and is correctly formatted. Check the field/property name of the list to see if you have provided the correct value for sorting. Then make sure it conforms to Documint's variable syntax (with the exception that it should not be surrounded by double curly brackets).

Secondly, your field needs to be a number field. Because the string data type holds alphanumeric (containing letters and numbers) characters, your field may look like a number field but still be of type string (HubSpot record IDs are stored as strings for example). If this is the case with your field, you can add the following expression to the top of your template and it should convert your field to a number type.

```handlebars
{{!-- Add the following expression to the top of your template --}}
{{#each list}}{{$var "field_name" ($ 'num({field_name})')}}{{/each}}

{{!-- Note: if the num() function encounters a non-numerical character, 
it will ignore it and any proceeding characters and just return whatever
numbers it has parsed up until that point. --}}
```

This works by looping over all the objects and assigning the field\_name field as a number within the [context](https://handlebarsjs.com/guide/expressions.html#changing-the-context) of the object that is currently being iterated over.

### Empty values in a list causing misaligned rows

If you are looping over a list of objects (collection), you need to place the repeating logic on the highest level element that will be repeating itself.&#x20;

If, instead, you place the repeating logic in each of the columns that display your objects properties, each column ends up repeating itself independently. Consequentially, if any of the objects in your list are missing properties, some of the columns will lag behind the others, and the rows will no longer be aligned.

See the troubleshooting section for the [repeating elements](https://docs.documint.me/~/changes/155/templates/page-elements/repeating-elements.md) page for extended details on where to place the repeating logic.

### Getting \[object Object] in my field

`[object Object]` appears when you try to reference an object directly. This can happen if you use the `{{this}}` keyword within the [context](https://docs.documint.me/~/changes/155/templates/page-elements/repeating-elements.md#context) of a collection (list of objects). This can also occur if the [variable](https://docs.documint.me/~/changes/155/templates/data-and-variables/syntax.md) or [path](https://docs.documint.me/~/changes/155/templates/data-and-variables/syntax.md#path) you are using points directly to an object.

Variables placed directly in the template need to be of a string (alphanumerical), number, or boolean (true/false) [data type](https://docs.documint.me/~/changes/155/templates/data-and-variables/data-types.md). In order to display an object, you would need to display its [properties](https://docs.documint.me/~/changes/155/templates/data-and-variables/syntax.md).

For a detailed explanation of why this occurs, please read <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString>

***

If you experience a problem not covered here, or the troubleshooting steps have not resolved your issue, please contact Documint support.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.documint.me/~/changes/155/additional-resources/troubleshooting.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
