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
How to Question: Export Attributes to text, html (Read 6817 times)
R. Jolly
Full Member
*
Offline



Posts: 11

How to Question: Export Attributes to text, html
Aug 05th, 2007, 12:41am
 
Thanks for starting the forum. I have a zillion questions... Here's one.

How do you export attribute values to text or html (csv would be nice)?

To give an example.

I have a bunch of student homework assignments that have been emailed to me. I import them to TB. My grading criterion is based on wordcount. So, let's say I create an attribute for Name and WordCount, and values of 500, 440, and 200 and so on are returned for each note. I have also created a blank user attribute called Grade. I make an agent that will perform the following action: if wordcount is greater than 450, assign A to attribute Grade, if the wordcount is between 449 and 400 assign B, if less than 400 assign C. (Action if(WordCount>450) Grade=A...  Is this syntax correct?)

Now, I have a bunch of notes with Grades assigned. I want to export these new Grade values (with student names) back to my Gradebook spreadsheet. What should I do? How do you export attributes to text or htlm? Is it possible to export as csv...? Or do I have to record each new grade manually back into the spreadsheet?







Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: How to Question: Export Attributes to text, ht
Reply #1 - Aug 5th, 2007, 10:29am
 
Go to http://homepage.mac.com/mwra/FileSharing1.html, and download the bottom-right demo "Create tab-delim text export". I think it should help sort you out. If not, lask back here.

[Post-edit]If not self-evident, in the template, simply change the tabs to commas. Either way, Excel's pretty happy taking either format.
Back to top
 
« Last Edit: Aug 5th, 2007, 10:42am by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: How to Question: Export Attributes to text, ht
Reply #2 - Aug 5th, 2007, 10:52am
 
Action if(WordCount>450) Grade=A...  Is this syntax correct?

You need curly braces {} around the action:

   if (WordCount>450) { Grade="A"}

-----

With regard to export, you will want to make an export template for each note, showing what gets exported and how.  For example:

    ^get(Name)   ,   ^get(WordCount)   ,   get(Grade)   <return>

The container would then export ^justChildren(gradeTemplate).  Notice how easily you can move from CSV to XML to some other export format, just by modifying the template.  An XML template might be

    <name>^get(Name)^</name>
    <grade>^get(Grade)^</grade>

or, for a different scheme,

    <examResult name="^get(Name)^" grade="Get(grade)^"  />

Back to top
 
 
WWW   IP Logged
R. Jolly
Full Member
*
Offline



Posts: 11

Re: How to Question: Export Attributes to text
Reply #3 - Aug 5th, 2007, 7:07pm
 
To Mark A.

The demo works perfectly. I can modify and use. Thanks very much.

To Mark B.

Thank you for the syntax correction. And the very helpful advice on export templates.

Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print