Skip to main content
Solved

How to add Suffix value to specific attribute value?


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

View original
Did this help you find an answer to your question?

4 replies

ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • 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+54

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+47
  • Evangelist
  • November 1, 2021

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


  • Author
  • November 1, 2021
ebygomm wrote:

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 

 

 

 

 

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings