Dependent fields in Fyle

This article discusses about what is a dependent field and how to use them in Fyle.

Gayathiri Sridhar avatar
Written by Gayathiri Sridhar
Updated over a week ago

What is a dependent field?

A dependent field is a hierarchical drop-down type custom field in Fyle. This could be used when you typically want to control the values displayed for a second field based on the values selected in the first field while creating an expense.

For example, say you want to show specific Project field values based on the Customer field values selected by your spenders, then you can set up dependent fields for this use case.

Another popular use case applicable in the construction vertical is to display Cost code values based on the Project selected. In such a case, you can set up a Project > Cost Code hierarchy and map Project values to specific Cost code values.

The project field here is known as the primary field, and the cost code is a field dependent on the Project.

How to create a dependent field in Fyle?

Follow the steps below to create a dependent field in your Fyle account :

  1. You can log in to your Fyle account with admin credentials.

  2. Head to Admin Settings > Expenses > Expense fields > Custom fields and select Add Custom field and select the Field Type as Dependent as shown below :

3. Now, select a parent field that would control the display of the dependent field and the field values. Currently, only Project and Cost Centre fields can be chosen as parent fields from the list of default system fields available.

Before you create a dependent field for Project or Cost Centre, please ensure you have already uploaded all the values of the Project and Cost Centre fields in Fyle.

You can also select a dependent field as a Parent field to create another dependent field. This would form a three-level hierarchy.

4. In this step, you can use an Excel or CSV file to Import the dependent field Cost Code values and map it to the Parent Project field.

To do this, first download the Excel template that Fyle shares. This would come with prefilled Project values you created under Organization > Project.

Once downloaded, add the Cost Code values that must be displayed when a specific project field value is selected.

For example, in the table below, if you want to display only the selective Cost Code values shown on the right side when corresponding Projects on the left are selected


Cost Code

Project 1

Cost Code 2, Cost Code 3, Cost Code 4, Cost Code 5

Project 2

Cost Code 1, Cost Code 3, Cost Code 6

Project 3

Cost Code 1, Cost Code 2

Then you need to edit the Excel file to look like this :

Points to note :

  • Each row is a unique mapping of project and cost code value. So, in the above example, although Project 1 is mapped to four Cost Code field values, you need to create these as four separate row values for the system to map the data correctly.

  • If you do not have a specific mapping or cost code value to be displayed for a project, you can leave that field empty. For example, in the above use case, Project 4 has no corresponding cost codes to display; hence, the Excel cell value is left empty.

  • By default, Fyle will only generate the Project values on the left once; based on the number of Cost codes that are needed to be shown for Project 1, you can duplicate and add more rows and fill with unique cost code values.

5. Once you have updated the Excel file with all the values, upload this once again in Fyle

Depending on the uploaded data size, it takes a few minutes for the data to reflect. Once uploaded successfully, you will notice the Cost Code values along with their Project mapping as shown below :

Creating a three-level hierarchy-dependent field

In steps 1 to 5, we saw how to create a Project > Cost Code dependency. Now say you would also like to add a Cost type that is dependent on Cost code, making the hierarchy look like Project > Cost Code > Cost Type; here is how you can achieve it :

  1. Head to Admin settings > Expense fields > Add custom field and select Field type Dependent.

  2. When selecting the Parent field, choose the previous dependent field value created. In the above example, this would be the Cost Code.

3. Once again, download the template, add values similar to steps 4 and 5 in the previous section, and upload the file. The cost type values will now be dependent on the Cost Code.

This way, you can create up to 5 hierarchy levels in the dependent field setup.

How would the dependent field show up while creating an expense?

Once the dependent field is set up, when you try to create an expense, the cost code field values will show up based on the project value selected, as shown in the video below :

You are now all set to start using Dependent fields in Fyle.

Please write to us at [email protected] if you have more questions or need assistance setting this up.

Did this answer your question?