Question

How to tell if an attribute is exposed

  • 17 March 2016
  • 2 replies
  • 0 views

Badge +22
  • Contributor
  • 1959 replies

I have several custom transformers where I need to temporarily expose the fme_feature_type. To keep workspaces that use them clean I would like to unexpose it, but only if it is not already exposed in the main canvas.

Ie. if the main canvas has the fme_feature_type exposed, then it stays exposed after the custom transformer, if it's hidden, then it is still hidden after the custom transformer.


2 replies

Userlevel 2
Badge +17

Hi @jdh, I don't think it's possible if you have once exposed "fme_feature_type". A workaround I can think of is: extract the feature type name as a temporary attribute by the FeatureTypeExtractor, use the temporary attribute to refer the feature type name, and remove it before outputting. However, the original feature type name cannot be modified via the temporary attribute. If you need to modify the original feature type name in the custom transformer, would have to do that with a Python or Tcl script implicitly, without exposing "fme_feature_type" anyway.

Userlevel 3
Badge +13

Hi @jdh, I don't think it's possible if you have once exposed "fme_feature_type". A workaround I can think of is: extract the feature type name as a temporary attribute by the FeatureTypeExtractor, use the temporary attribute to refer the feature type name, and remove it before outputting. However, the original feature type name cannot be modified via the temporary attribute. If you need to modify the original feature type name in the custom transformer, would have to do that with a Python or Tcl script implicitly, without exposing "fme_feature_type" anyway.

I agree with Takashi -- I can't think of a way either to conditionally unexpose based on the use situation.

Reply