Skip to main content
Solved

How to add Suffix value to specific attribute value?

  • November 1, 2021
  • 4 replies
  • 114 views

Hi All,

I am working a project ,where client asked us to add suffix to a attribute value .This attribute value is not a Unique , in order to make it unique we have ad suffix values as shown below image , requesting you all to provide a solution ? to reach this requirement! (the suffix number should be 4 numbers)

imageThanks in advance.

Best answer by ebygomm

Use a counter, with a Counter Name/Group by set to the input Json document name, then an attributecreator/manager to add this attribute padded with zeroes to the document name

image

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.

4 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • Best Answer
  • November 1, 2021

Use a counter, with a Counter Name/Group by set to the input Json document name, then an attributecreator/manager to add this attribute padded with zeroes to the document name

image


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • November 1, 2021

Multiple possibilities, this is how I do it:

  • Directory and File Pathnames Reader to scan for files
  • Excel Reader to read document with old and new names.
  • FeatureMerger to merge new names to files found.
  • AttributeCreater to create commandline command to rename file. (like this)
  • SystemCaller to run commandline.

geomancer
Evangelist
Forum|alt.badge.img+58
  • Evangelist
  • 932 replies
  • November 1, 2021

I removed my answer (using a ListBuilder and a ListExploder), as @ebygomm​'s solution is faster and uses fewer transformers.


  • Author
  • 4 replies
  • November 1, 2021

Use a counter, with a Counter Name/Group by set to the input Json document name, then an attributecreator/manager to add this attribute padded with zeroes to the document name

image

Thank you ebgomm, it worked as per my requirement.

image