Extracting a report through API

Hi all,

I have recently developed a script with a GUI for users to quickly generate
Invoice, Expense, Timeslip or Project reports from Freeagent data.
Everything is working fine, the script, depending on the users selections
through the GUI, generates the relevant URL to query the API/Freeagent
database.

My issue is the data that is exported to a CSV file is thrown out of order
by blank fields.
For Example:

  1. URL USER *PROJECT *CATEGORY DATED_ON

  2. URL USER *PROJECT *CATEGORY DATED_ON

  3. URL USER CATEGORY DATED_ON

  4. URL USER *PROJECT *CATEGORY DATED_ON

The example above is trying to demonstrate that if on line Three, ‘PROJECT’
data wasn’t included in the Invoice, Expense etc, the CSV will show in
Excel in this manner and throw all the columns out of line.

What I was hoping to find is a way to include ‘empty’ fields in the API
request so the export would just display a blank cell instead of causing
the line to ‘collapse’. Even if it just spat out a pair of " in the place
of the empty field, I could work the script to see that as an entry.

Thanks in advance for any help.

Regards,
Karl

Hi Karl,

I’m afraid the API doesn’t include keys for blank fields. This feature has
been requested before but it’s not something we’re planning to add soon. I
can only suggest that you maintain a list of the standard fields for each
resource and generate your CSV from that.

Kind regards,

GraemeOn 12 December 2013 10:53, Karl Sayle karlsayle@gmail.com wrote:

Hi all,

I have recently developed a script with a GUI for users to quickly
generate Invoice, Expense, Timeslip or Project reports from Freeagent data.
Everything is working fine, the script, depending on the users selections
through the GUI, generates the relevant URL to query the API/Freeagent
database.

My issue is the data that is exported to a CSV file is thrown out of order
by blank fields.
For Example:

  1. URL USER *PROJECT *CATEGORY DATED_ON

  2. URL USER *PROJECT *CATEGORY DATED_ON

  3. URL USER CATEGORY DATED_ON

  4. URL USER *PROJECT *CATEGORY DATED_ON

The example above is trying to demonstrate that if on line Three,
‘PROJECT’ data wasn’t included in the Invoice, Expense etc, the CSV will
show in Excel in this manner and throw all the columns out of line.

What I was hoping to find is a way to include ‘empty’ fields in the API
request so the export would just display a blank cell instead of causing
the line to ‘collapse’. Even if it just spat out a pair of " in the place
of the empty field, I could work the script to see that as an entry.

Thanks in advance for any help.

Regards,
Karl


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Graeme Boyd
Senior Software Engineer

Web. freeagent.com http://www.freeagent.com/ Blog. freeagent.com/blog
Twitter. @freeagent https://twitter.com/#!/freeagent Facebook.
facebook.com/freeagentapp

40 Torphichen Street, Edinburgh, EH3 8JB
FreeAgent Central Ltd. Registered in sunny Scotland SC316774