# Workflow Automation: Using Custom Variables

Use **Custom Variable/Calc** to create variables and perform calculations from a Podio *Field* for later use in another *Field* or *Field Type*.

***NOTE:** Do not use special characters in Token Names as these can cause issues with HTML and PHP code resulting in a broken token.*

For example, a Podio *Date Field* will return the date in the format of "dd-month-YYYY". If you want to output this date format differently, creating a **Custom Variable** is required.

First, select the flow **Trigger** and add selected **Filters**

Next, add a **Custom Variable/Calc** and write the **PHP Calculation** required. These **Variables** always needed to be created BEFORE the action they are being used in.

![Using Custom Variables 1](https://www.progress.com/podio/documentation/assets/6f735274b47b4ea8b2156c18ea9b6dbd/customvar1.png)

*The preview will show the formatted date. Please note the UI doesn't calculate previous **Variable** bricks when showing in the preview so you may not see the result you want and will need to run the flow to test.*

Add the **Make A PDF** action.

Using the **Token Selector**, select the **Custom Variable** and insert into the PDF

![Using Custom Variables 2](https://www.progress.com/podio/documentation/assets/9756f10fcd27082f881cfc56551b42bd/customvar2.png)

The value returned in the PDF invoice will be the formatted value.

Check your calculations using Podio Items data using **Simulate Vars**

See this in action in our Blog post [Create a PDF Invoice with a Table of Detail Line Items](https://secure.globiflow.com/blog/create-a-pdf-invoice-with-a-table-of-detail-line-items.php)
