Hi Jason, I think a published pick-list is something that is probably already on our radar screens (Matt are you reading this? Can you confirm?) - I'd certainly like to have a GUI option for this - up till now I've been editing the header to create such a list.
For the space replacer use a StringReplacer. In the regular expression use [ ] to define a space - ie the space char needs to be in between square brackets. Then leave the replacement text empty to replace each space with 'nothing'. Actually - I think stringReplacer has changed. It doesn't appear to work any more. You can replace the space with a character, but not with nothing. I copied in an old stringReplacer from a previous workspace and it works fine, so if you can, do that. The old version has a setting 'regular expression' instead of the newer 'string to find'. In the meantime I'll file a PR. Mark --- In [email protected], "Jason Birch" <[EMAIL PROTECTED]> wrote: > > Hi Mark, > > I'll have a go at a Custom Transformer. > > Is there any way of publishing a list of options (for a drop-down > selection) from within a custom transformer? If not, can I put in an > enhancement request for that? It would be useful for yes/no type > options as well as conditional processing based on a larger set of > values. > > While I'm here, I've been having problems trying to figure out how to > strip all internal spaces from a string. I've been playing around with > StringReplacer and StringPairReplacer with no luck. Any ideas? > > Thanks, > Jason > > > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of > mark2atsafe > Sent: Monday, February 27, 2006 09:14 > To: [email protected] > Subject: [fme] Re: ValueReplacer > > A better way would be to encapsulate the Tester and AttributeSetter > inside a custom transformer. It'll help tidy the workspace and you may > be able to publish and share some of the parameters so you aren't having > to set them in so many places. > > Alternatively the StringReplacer might be of use. If you set the output > attribute name to be the same as the source you wouldn't need an > AttributeXxxx transformer and I don't think there would be any problems. > Again you could publish the regular expression or replacement text > settings to avoid having to set them multiple times. > > Mark > > Mark Ireland, Product Support Engineer > Safe Software Inc. Surrey, BC, CANADA > [EMAIL PROTECTED] http://www.safe.com > Solutions for Spatial Data Translation, Distribution and Access > > --- In [email protected], "Jason Birch" <jason.birch@> wrote: > > > > Hi all, > > > > I'm looking for a transformer or procedure that mimics the behaviour > > of the NullAttributeReplacer, but with a different value than NULL. > > For instance, I want to replace the value of a list of attributes with > > > the word "UNKNOWN" if their current value is "0". Currently, I'm > > using a huge string of Testers and AttributeSetters, but there has to > > be a better way... > > > > Thanks, > > Jason > > > > > > > > > Get the maximum benefit from your FME, FME Objects, or SpatialDirect via > our Professional Services team. Visit www.safe.com/services for > details. > Yahoo! Groups Links > Get the maximum benefit from your FME, FME Objects, or SpatialDirect via our Professional Services team. Visit www.safe.com/services for details. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/fme/ <*> 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/
