Help Centre › Building Processes
This article describes the RPA Document functionality to filter statement line item references by an example pattern.
For a full list of available functions, please read DOCUMENT functions.
Description
The Filter line item references function cleans up extracted statement data by separating reference numbers from descriptions. You provide an example of what a valid reference looks like, and the function builds a pattern from it: digits in the example match any digit, letters match any letter.
For each line item in the statement:
- If the reference matches the pattern, it stays in the
referencefield - If the reference does not match, it is moved to the front of the
descriptionfield, and thereferencefield is cleared
How patterns work
| Example pattern | What it matches | Keeps in reference | Moves to description |
|---|---|---|---|
2300000 | Any 7-digit number | 2416868, 1234567 | PO10017212, INVRSA123 |
PO10000000 | PO + 8 digits | PO10017212, PO99887766 | 2416868, INV12345 |
INVRSA00000000 | 6 letters + 8 digits | INVRSA12345678 | 2416868, PO10017212 |
Setting it up
To use the Filter line item references function, follow these instructions:
{{popups:rpas/add:action=statement-filter-reference}}
Once on a process map:
- Navigate to the process where you would like to add the function
- Click on the green button’s drop-down (right side of the green button labelled “Process”)
- On the menu that appears, click on the “+ Activity” item
- From here you can select the DOCUMENT Filter line item references option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Reference pattern | Yes | Text | - | An example of what the reference should look like. Digits match any digit, letters match any letter. E.g. '2300000' matches any 7-digit number. |
| Variable | Yes | Text | - | Name of the variable containing the extracted statement data to filter |
Output
The function modifies the statement data in place. After filtering:
- Line items with matching references keep their
referencefield unchanged - Line items with non-matching references have the old reference prepended to
descriptionandreferenceis cleared
Errors
- Variable not found – the specified variable does not contain statement data
- Invalid pattern – the pattern example is empty
Tips
- Run this after extracting statement data to clean up references before reconciliation
- Use multiple filter steps with different patterns if statements contain mixed reference formats
- The pattern is case-sensitive for letters: 'PO' matches uppercase only. Use the exact case you expect.