Exclude Lines from Files Automatically
Overview
Some files contain rows of data that are either incomplete or do not need to be loaded for various reasons. UpSheets provides the ability to create mappings to automatically remove these lines when you validate your file.
Methods
There are two ways to create Exclude Mappings:
- Create an Exclude Mapping when importing a file
- Define an Exclude Mapping from the Mapping Menu
Creating an Exclude Mapping
Select Mapping from the menu:
![mapping](https://malcolm-en-gb.s3.eu-west-1.amazonaws.com/instances/j0x2GOjMS3/resources/4fVPPKVG6L/mapping.png)
Excluding Empty Values
Checkboxes are available to ignore lines with no value. If selected, any lines that do not have a value will automatically be deleted. This is available for:
- Employee Name
- Date
- Hours
- Tracking Code (if enabled in Xero)
The below options would exclude any lines that do not have a value for Employee, Date or Tracking Code.
![mapping_flags](https://malcolm-en-gb.s3.eu-west-1.amazonaws.com/instances/j0x2GOjMS3/resources/8FRXztJMA3/mapping_flags.png)
Excluding Specific Values
Specific values can also be excluded by:
- Select Create Mapping
- Select the Mapping type to exclude (Employee, Type, Tracking Code, Project, User)
- In the File Value field enter the value in your file to ignore
- Select *EXCLUDE* in the** Xero Valu**e field and click Save Mapping
In the below example, UpSheets will exclude any lines where the Employee Name is Jimmy Lebron
![mapping_exclude_employee](https://malcolm-en-gb.s3.eu-west-1.amazonaws.com/instances/j0x2GOjMS3/resources/qZs8PleqEk/mapping_exclude_employee.png)
In the below example, UpSheets will exclude any lines that have a Tracking Code of XXXX
![mapping_exclude_new](https://malcolm-en-gb.s3.eu-west-1.amazonaws.com/instances/j0x2GOjMS3/resources/zspktaMYmW/mapping_exclude_new.png)
Viewing Excluded Lines
When importing a file that matches an exclude mapping, a message is displayed indicating the number of excluded lines. Hovering over the number will also show a breakdown of which types have been excluded.
![exclude_links](https://malcolm-en-gb.s3.eu-west-1.amazonaws.com/instances/j0x2GOjMS3/resources/BIjPUXdq25/exclude_links.png)
Removing an Exclude Mapping
To remove an exclude mapping navigate to the Mapping screen and click Delete. Then click Confirm to delete it.
The mapping will not apply to any future files imported. You can also click Reload Data from File from a file that is already validated to process it without any deleted rules - any other edits since importing the file will also be deleted.