Question

how can I capture and fme_feature_type attribute into an open editor?


Badge
Hi

 

 

 I  have exposed the fme_feature_type attribute from a feature class and need  to pass it  into the open editor but dont know how. The fme_feature_type contains the name of the feature class  which I need to use in a string of text.

 

 

Any pointers on how to bring that into the open editor? who can I format the bolded text in the editor so I can see the actual value?

 

{fme:get-attribute("fme_feature_type")} at $(Base1), $(Location1) $(City2), $(State), ($(Year))

 

 

 Thanks in advance for any guidance :)

15 replies

Userlevel 4
Badge +13
Have you tried @value(fme_feature_type)?

 

 

Badge
Itay, 

 

 this is what I got when I used the @value(fme_feature_type)

 

 

@value(fme_feature_type) at Navy, Tampa, Florida, (2013) for example

 

 

What I need to see as a result is :

 

 

Signs at Navy, Tampa, Florida, (2013) for example

 

Badge
the other values you see in the string  were casted as parameters. I dont know if there is a way to call the fme_feateure_type and make it a parameter that I could call in my string of text.
Userlevel 4
Badge +13
I usually use the feature type extractor 

 

http://docs.safe.com/fme/html/FME_Transformers/Default.htm#Transformers/featuretypeextractor.htm

 

 

Or copy it into a new attribute 
Userlevel 4
Badge +13
You can always create a parameter and fetch the ft with a parameter fetcher but that seems excessive to me
Badge
This is what I got:

 

 

@value("_feature_type") at Navy, Tampa, Florida, (2013)
Userlevel 4
Badge +13
Mmm last shot at it.... Have you tried the attribute dereferencer?
Badge
I will try that in a few. Thanks for all of the help man
Userlevel 4
Badge +13
No sweat ;) could be that the ft cannot be reached because of the dynamic properties of the translation, another possibility would be to use the string concatenator or attribute creator

 

Userlevel 2
Badge +17
Hi Gerardo,

 

 

FME is basically case sensitive except in some specific cases, and FME function name starts with @ and an upper case letter. Try @Value(fme_feature_type).

 

 

Takashi
Userlevel 4
Hi,

 

 

Takashi is right, FME is mostly case sensitive so you need to write "@Value" with an upper case V. The expression "@value" which was suggested below will therefore not work.

 

 

The easiest way, in my opinion, to build strings like this is to use the StringConcatenator. I prefer the Advanced view, which isn't really that complicated. Just double-click in the attribute and function list on the left and the correct reference will be inserted into the cursor position:

 

 

 

 

David
Userlevel 4
Badge +13
Typo...
Badge
I see. your suggestions seem to work well in the open editor from the string concatenator.

 

My problem is that  I am using the open editor from the xml updater.. and that one doesnt like the @Value. Regardless of what attributes I double click  or drag over. it is spitting it out literally instead of extracting the value into the editor. This leads me to believe that it might be a formatting issue
Userlevel 4
Badge +13
Hi Gerardo,

 

 

I am sure Safe would appreciate hearing about it, sounds like a bug to me.

 

 

Badge
Itay, Takashi and David.  Thanks for all of your help

Reply