How to use custom fields (IQL)
Custom fields (i.e., computed fields) allow you to get your data in the exact form you need it. If you've ever entered a formula in Excel or Google Sheets, then you're already aware of the concept of custom fields.
In Impira, you can create custom fields within a Collection, or use the Join function to connect values across Collections. The “computation” options include not only basic arithmetical and string functions, but logical functions and even advanced regex.
Let's take a look at a couple of simple examples:
Example: Concatenating name fields
Let's say you've already extracted the fields First name and Last name from a set of files, but you want to combine them into a single field called Full Name.
- Open your Collection and click the + on the right side of your table.
- For Name, enter “Full Name”.
- For Type, select Create custom field (IQL).
- For Expression, enter the function:
concat(`First name`, " " ,`Last name`)
This function concatenates three values: The First Name field, a blank space, and the Last Name field.
- Hit Create.
Your Collection will now include a column for Full Name:
Example: Function on date fields
In this example, you have a Collection of applications and you want to determine the amount of days between when the application was submitted and when an application was closed.
You could extract the fields, Submission date and Close date, then create a new custom field to determine how many days went by between the two dates.
- Add a new field with the + button to the right of your Collection.
- Name your field — e.g., “Days to close”.
- For Type, choose Add a custom field (IQL).
- For Expression, use:
(`Close date`-`Submission date`)/24/60/60
You'll see a new field appear in your Collection populated with Days to close values: