Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Exporting Attributes and Notes (Read 3575 times)
AGHorne
Full Member
*
Offline



Posts: 116

Exporting Attributes and Notes
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.
Back to top
 
« Last Edit: Jan 17th, 2011, 10:53am by AGHorne »  
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Exporting Attributes and Notes
Reply #1 - 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.)
Back to top
 
« Last Edit: Jan 17th, 2011, 11:32am by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
AGHorne
Full Member
*
Offline



Posts: 116

Re: Exporting Attributes and Notes
Reply #2 - Jan 18th, 2011, 7:09pm
 
Great!  Thanks again, Mark.
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print