We are currently experiencing higher than normal support inquiries and response times. The Community is here to support you as well so please help each other out when you can. Please visit our status page to subscribe to updates.

Meaning of "expense.transactionID" in export_report_template

GetawayHouseGetawayHouse Posts: 6Expensify Customer
edited October 10 in Integrations and API

I'm trying to get a list of expenses reported, using the api with { type: 'file' } 

 json = {
   type: 'file',
   credentials: {
   onReceive: {
    immediateResponse: ["returnRandomFileName"]
   inputSettings: {
    filters: {
     startDate: self.month.beginning_of_month.strftime('%Y-%m-%d'),
     endDate: self.month.end_of_month.strftime('%Y-%m-%d'),
    type: 'combinedReportData',
   outputSettings: {
    fileExtension: 'csv'

And my template looks like:

<#if addHeader == true>
  Amount,Sales date,Tag,Category,Comment,Report status,External ID,Name,Email<#lt>
<#list reports as report>
  <#-- Report level -->
  <#list report.transactionList as expense>
    <#if expense.modifiedAmount?has_content>
      <#assign amount = expense.modifiedAmount/100>
      <#assign amount = expense.amount/100>
    <#if expense.modifiedCreated?has_content>
      <#assign created = expense.modifiedCreated>
      <#assign created = expense.created>
${amount},${created},${expense.tag},${expense.category},"${expense.comment?replace("\"", "'")}",${report.status},${expense.transactionID},${report.submitter.fullName},${expense.attendees.get(0).displayName}

The problem is: I'm getting repeated ids for this field, for example: For the id 35387923473891400 I have 21 expenses with different values and comments, shouldn't every expense have it's own unique id? If I go to the dashboard, I can find a report with those 21 expenses...

If expense.transactionID isn't unique for each expense, is there a field that is?


Sign In or Register to comment.