Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Tinderbox applications >> listing the values of a string attribute
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1225633411

Message started by Sebastian Stephenson on Nov 2nd, 2008, 8:43am

Title: listing the values of a string attribute
Post by Sebastian Stephenson on Nov 2nd, 2008, 8:43am

hi

I am trying to find a way to list all of the values for example the "topic" attribute which is a string.

I what at a glance to have a way to see all the values of this "topic" attribute

I know you can do a table expression of the values but unless it is scrollable I need another way to view them as it will get very big

I want to do this because I want to write agents for getting notes that I took over a year ago

thanks

if this is not clear please reply and tell me thanks

Title: Re: listing the values of a string attribute
Post by Mark Bernstein on Nov 2nd, 2008, 9:48am

If you have a modest number of unique topics -- less than 99 as I recall -- you can see all the values in use in the pull-down menu of the key attribute table.  (The limit on the pulldown menu's length is configurable, so you can extend this if you want)

If you have far too many topics to list in the menu, what I'd do is to write an agent that collects everything with a topic, sorts alphabetically by topic, and exports the topics on separate lines:

    Apples
    Aviaries
    Aviaries
    Best Practices
    Brasil

Then use the command-line program uniq, or BBEdit, or remove the duplicate lines. Voila!

Title: Re: listing the values of a string attribute
Post by Sebastian Stephenson on Nov 2nd, 2008, 11:31am

yeah the pull down menu may be good as all the notes that are labeled with topic are under a prototype so I may keep the text window open of the prototype and see the topics

thanks

anyone suggestion are very much welcomed

Title: Re: listing the values of a string attribute
Post by Mark Bernstein on Nov 2nd, 2008, 12:33pm

Another possiblity: make an agent that collects all the notes with topics. Sort alphabetically by topic.

In the export template, export the topic ONLY if it's not the same as the previous topic.

Voila!

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.