Skip to main content
Question

How to use String Functions in Attribute Manager to split text?

  • July 22, 2021
  • 3 replies
  • 2145 views

khaphan

Hi everybody, I have a table which a column contain content as "province_district_ward_2020" and I want to split it into a word. Example: 

Before: "HoChiMinhcity_District1_ward1_2020" 

After: "HoChiMinhcity" / "District 1" / "Ward 1" / "2020"

I tried use StringPadder or StringReplace but the result which It's not my expected result. I think there are wrongs in my process. 

Can you help me know how to work it? Thank you so much!

3 replies

caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • 571 replies
  • July 22, 2021

Consider using AttributeSplitter instead.

Just fill in your delimiter of choice (_).

Use ListExploder afterwards if you want the list elements in attributes.


danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2077 replies
  • July 22, 2021

Just add information to add quotes in the words, you can use transformer for add prefix and sufix = BulkAttributeRenamer


khaphan
  • Author
  • 6 replies
  • July 24, 2021

Thank you so much! I will try your idea!