Skip to main content
Solved

How can I calculate value of Attribute as shapefile name in FME?


khaphan

I have amount Shapefiles and I want calculate value of attribute as shapefile name. Who can help me? Thanks so much!

Best answer by caracadrian

Your question is a bit ambiguous.

If you need the name of the file that you read you can expose fme_basename on the reader Format Attributes tab.

Reader fme_basenameIf you need to write your features to a controlled custom filename set Shapefile Name on the writer to an attribute or a concatenation of attributes via Text Editor.

Writer filename by attribute

View original
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • Best Answer
  • July 22, 2021

Your question is a bit ambiguous.

If you need the name of the file that you read you can expose fme_basename on the reader Format Attributes tab.

Reader fme_basenameIf you need to write your features to a controlled custom filename set Shapefile Name on the writer to an attribute or a concatenation of attributes via Text Editor.

Writer filename by attribute


khaphan
  • Author
  • July 22, 2021

Your question is a bit ambiguous.

If you need the name of the file that you read you can expose fme_basename on the reader Format Attributes tab.

Reader fme_basenameIf you need to write your features to a controlled custom filename set Shapefile Name on the writer to an attribute or a concatenation of attributes via Text Editor.

Writer filename by attribute

Thank for your support. I setup Format Attribute at Reader and Writer so It worked. 😁