Hi Steve,
Assuming I read it right, there's a couple of options. 

1) Do it manually. Expose _DEP_histogram{0}.count and then in an
AttributeCreator create an attribute called OnTime using the exposed
attribute to set the value.

2) Automatically. Use Jeff Konnen's excellent idea for the
FMEFunctionCaller - I just tried this with a workspace using the syntax...

@CopyAttributes(@Value(histogramList{0}.value),histogramList{0}.count)

...and it worked fine.
The only problem is that the attribute isn't 'exposed' within
Workbench. You'd have to expose it manually.

I will post my workspace to fmepedia shortly as an example of how to
use FMEFunctionCaller (and ListHistogrammer). In fact I might even
roll it into a custom transformer, because then you could loop through
the list creating an attribute for each entry.

With development for FME2008 due to start I'm sure we (the support
team) will be asked what our hot issues are for this year. I think I
will suggest a transformer to create an attribute, taking the
attribute name from an existing attribute value. It seems to be a
popular need.

If you have FME suggestions then don't forget the add them the list on
fmepedia... http://www.fmepedia.com/index.php/FME_Suggestions (we do
look at this, promise).

Regards,

Mark

Mark Ireland, Senior Product Specialist
Safe Software Inc. Surrey, BC, CANADA
[EMAIL PROTECTED] http://www.safe.com
Solutions for Spatial Data Translation, Distribution and Access

--- In [email protected], "snelsons2006" <[EMAIL PROTECTED]> wrote:
>
> Hi group,
> Can anyone think of a way to use the results from the 
> ListHistogrammer as new attributes?  I've tried exposing attributes 
> but can't find a way to create new attribute/headings with the 
> Histogrammer results...
>  
> I'm reading a spreadsheet, and creating a list based on a column, 
> then I'm using the ListHistogrammer to see how many 'counts' of each 
> value I have.
> 
> A sample of my results:
> _DEP_histogram{0}.count: 78 
> _DEP_histogram{0}.value : OnTime
> _DEP_histogram{1}.count: 9 
> _DEP_histogram{1}.value : LeaveEarly
> _DEP_histogram{2}.count: 7 
> _DEP_histogram{2}.value : LeaveVeryLate
> _DEP_histogram{3}.count: 3 
> _DEP_histogram{3}.value : LeaveLate
> _DEP_histogram{4}.count: 1 
> _DEP_histogram{4}.value : LeaveVeryEarly
> 
> Is there a way to be able to then have 5 new attributes with the 
> corresponding list "value", and the "count" as the new attribute's 
> value - like this:
> 
> OnTime 78
> LeaveEarly 9
> LeaveVeryLate 7
> Leave Late 3
> LeaveVeryEarly 1
>




For insights into what's up at Safe Software and what's on the development 
horizon, visit Safe's blog at spatial-etl.blogspot.com.

Love FME? Then open your diary to March 6-7, 2008 and write this... "Second 
Worldwide FME User Conference - Must Attend!" See 
http://www.safe.com/company/fmeuc2008/index.php for more details. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/fme/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/fme/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to