Is there a way to filter by two different exported names via API?

Is there a way to filter by two different exported names via API?
According to the API, markedAsExported filter does:
Filters out reports that have already been exported with that label out.
I want to filter out 2 labels.
Best Answer
-
Nicole Mendonca Expensify Customer, Expensify Team Posts: 97 Expensify Team
Hi @edison! The "label" in this context is that it has been exported. We don't support filtering on multiple export names. As a workaround, you can do the filtering in the template itself using something like:
report.allExportsLabels?seq_contains("ABCD")>
.Hope that helps!
Answers
Thanks Nicole for the workaround! I'll try it out.
- Spam
- Abuse
- Report
1 · Accept Answer Off Topic Insightful Vote Up 1AwesomeHi @Nicole Mendonca - I tried using
report.allExportsLabels
(without any filters) and it's not pulling up any data. Wondering if that's the correct name?- Spam
- Abuse
- Report
0 · Accept Answer Off Topic Insightful Vote Up AwesomeHi @edison - Did you include a template name? Can you post here exactly what you included? What are the "exported names" you want to filter by?
Thanks!
- Spam
- Abuse
- Report
0 · Accept Answer Off Topic Insightful Vote Up AwesomeHi @Nicole Mendonca see info below:
requestJobDescription =
template =
Based on the above, I'm currently not using any filters in the
requestJobDescription
for exported, nor am I using anseq
in the freemarker template. I would expect there to be some data though for the report.allExportsLabels field.- Spam
- Abuse
- Report
0 · Accept Answer Off Topic Insightful Vote Up AwesomeHi @edison,
report.allExportsLabels
is a list of all the export labels that are applied to the report, to make it easier to filter the reports directly in the template, like this:If you want to output all the export labels for a report, you'll need to convert the list to a string first, for example like this:
Cheers
- Spam
- Abuse
- Report
1 · Accept Answer Off Topic Insightful Vote Up 1AwesomeAh that did it. Didn't know how those labels were stored. Thanks @Francois Laithier !
- Spam
- Abuse
- Report
5 · Accept Answer Off Topic Insightful Vote Up Awesome