# Using Short Codes in Reports

\
Short codes can significantly improve the efficiency of data representation. They can be created to represent specific data fields at the [client](https://docs.plextrac.com/plextrac-documentation/product-documentation/clients/using-short-codes-from-the-client-level-in-plextrac) and report levels.&#x20;

With pre-defined codes, users can quickly insert data without manually entering lengthy information, saving time and effort during the report creation process. Moreover, standardized placeholders help maintain consistency in data presentation across different reports, ensuring a uniform format and structure that creates a professional and organized image.

Short codes provide flexibility and adaptability. They enable users to customize formats and update information without changing the underlying data. This ensures that reports are presented according to individual preferences and industry standards, minimizing the risk of errors and enhancing accuracy.

{% hint style="info" %}
[Short Codes](https://docs.plextrac.com/plextrac-documentation/product-documentation-1/account-management/account-admin/tenant-settings/short-codes) are managed by admins in the **Admin Dashboard**.
{% endhint %}

## Adding Custom Short Codes

<mark style="background-color:yellow;">Step 1:</mark> From the Reports module home page, click **Readout** under the "Actions" column of the report to edit.&#x20;

<mark style="background-color:yellow;">Step 2:</mark> Click the **Details** tab.

<div align="left"><figure><img src="https://4252973360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LXA6EayCcg12qfDcfXd%2Fuploads%2F9S4JGcN3IaCFGqPdVH4e%2Fimage.png?alt=media&#x26;token=996f2f39-0f50-46b0-af78-4b53484465ad" alt=""><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 2:</mark> Click the **Add new** button at the bottom of the page under "Custom fields."

<div align="left"><figure><img src="https://4252973360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LXA6EayCcg12qfDcfXd%2Fuploads%2Fu3u4OPtsXssM9FxRehR9%2Fimage.png?alt=media&#x26;token=9a01fffb-8470-4a06-8da7-11d152709287" alt="" width="563"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 3:</mark> In the first box on the left, add a label value to correspond with the short code, and in the second box on the right, insert the text value that will replace the short code.

This value will replace the short code used in the report's narratives or a finding's text fields.

<div align="left"><figure><img src="https://4252973360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LXA6EayCcg12qfDcfXd%2Fuploads%2FralWEHjdyhT2VCHIAqHI%2Fimage.png?alt=media&#x26;token=84f7d810-9574-435b-a9b4-ba52bc613597" alt="" width="563"><figcaption></figcaption></figure></div>

Repeat the process to add another short code.

{% hint style="warning" %}
The short code value must exist and be set by an admin as a "Report Custom Field" for Source. If it does not, contact the admin to add it under "Tenant Settings>Short Codes."\
![](https://4252973360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LXA6EayCcg12qfDcfXd%2Fuploads%2Fz0LUHwX3yNk3f3MbsTft%2Fimage.png?alt=media\&token=1c42cbf9-91f4-4a43-8fa5-91182bc1f0d7)
{% endhint %}

The **Custom Field** label links the short code to the value (text data) that is to replace it. For example:

* **Label:** Contact Email
* **Value (text data):** <janep@karbo.com>
* **Short Code:** %%Contact\_Email%%

{% hint style="info" %}
Short Codes in the Admin Dashboard always begin and end with %% and have underscores rather than spaces.
{% endhint %}

<mark style="background-color:yellow;">Step 4:</mark> Use the short code in any report narrative. Changes will be autosaved.

<div align="left"><figure><img src="https://4252973360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LXA6EayCcg12qfDcfXd%2Fuploads%2FNCWZe7rOScN8CHDetD6y%2Fimage.png?alt=media&#x26;token=68207f8c-7888-463d-809e-9b01d1e31437" alt="" width="563"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 5:</mark> To activate the short codes, click **Search & Replace** at the top right of the page within the **Reports** module.

<div align="left"><figure><img src="https://4252973360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LXA6EayCcg12qfDcfXd%2Fuploads%2FvjWivmQne36mzzCxRIUp%2Fimage.png?alt=media&#x26;token=25c8e6f6-8d11-4287-bbf3-8c91fd276f6a" alt="" width="335"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 6:</mark> The **Search & Replace** modal appears. Click **Replace Short Codes** to replace all short codes in the report with their corresponding text data.

<div align="left"><figure><img src="https://4252973360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LXA6EayCcg12qfDcfXd%2Fuploads%2F51jd9n9q5BXUHP6PTCiu%2Fimage.png?alt=media&#x26;token=ff06fb0d-ada0-4fa7-9315-78aec54fbc9c" alt="" width="395"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 7:</mark> Click **Confirm**.

<div align="left"><figure><img src="https://4252973360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LXA6EayCcg12qfDcfXd%2Fuploads%2FMg9uUwLCfFKokAkWmEOH%2Fimage.png?alt=media&#x26;token=bf3f07cd-5004-4a6e-8492-eab2225c2745" alt="" width="395"><figcaption></figcaption></figure></div>

A confirmation message will appear.

<div align="left"><img src="https://4252973360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LXA6EayCcg12qfDcfXd%2Fuploads%2FFHtCfPRVvSQCDcsoySRO%2Fimage.png?alt=media&#x26;token=375c0760-4188-4dd0-b486-d3d23594b9ff" alt="" width="341"></div>

<mark style="background-color:yellow;">Step 8:</mark> Validate that the change occurred as desired, assuming the short code exists in the tenant settings.&#x20;

<div align="left"><figure><img src="https://4252973360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LXA6EayCcg12qfDcfXd%2Fuploads%2FK7WZdgwEDJQsk8MaZk9L%2Fimage.png?alt=media&#x26;token=fa4ec8cc-b854-4a42-887a-f8f689837b90" alt="" width="563"><figcaption></figcaption></figure></div>

If the fields did not process as expected, kindly request the administrator to confirm their setup in the **Admin Dashboard** and ensure that the appropriate short code was utilized. Then, proceed to repeat steps 6-8.
