Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Exporting from Tinderbox >> Exporting Attributes and Notes
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1295279379

Message started by AGHorne on Jan 17th, 2011, 10:49am

Title: Exporting Attributes and Notes
Post by AGHorne on Jan 17th, 2011, 10:49am

I'm using TinderBox to track some payroll discrepancies and would like to export my notes to present to the company accountants.  

I have a few simple attributes I created:  
WeekEnding (DATE), Employee(STRING), Paid (BOOLEAN)

In the note field itself, I have "Discrepancy" and "Additional Notes" where I type the information.

Is it possible to export the notes with the attribute information? Ideally, I'd like the note to look like the following...


Employee - John Doe
WeekEnding - 1/08/2011

Discrepancy
My Notes

Additional Note
My Notes


and then the next note.  

I'm only using Paid to for Agent purposes.

As always, thanks for any advice and help.

Title: Re: Exporting Attributes and Notes
Post by Mark Anderson on Jan 17th, 2011, 11:32am

I assume the Discrepancy/Additional notes data is in the per-employee notes $Text? If so...

OK, here's the template code for templete to be used by the agent collecting the per-employee notes:

Quote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
     <title>^title^</title>
     <meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>

^children(employee-template)^

</body>
</html>


The second template, to be called 'employee-template', holds the code used to export the per-person data:

Quote:
<div>
<hr>
<p>Employee - ^value($Employee)^</p>
<p>WeekEnding - ^value(format($WeekEnding,"d/m/y"))^</p>
^text^
<hr>
</div>
Leave a blank line after the </div> so the next person's data output start on a new line.

Now, select the agent, open its HTML view and select the first template and the code does all the rest. Click the view's export button and save and you've an HTML file. You can style it with CSS if you like and send as is or print to PDF and send etc.

(You can always just leave out the HTML code if you want plain text.)

Title: Re: Exporting Attributes and Notes
Post by AGHorne on Jan 18th, 2011, 7:09pm

Great!  Thanks again, Mark.

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.