Skip to main content
Question

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

  • Jul 22, 2021 11:41 AM UTC
  • 3 replies
  • 2401 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
  • Jul 22, 2021 5:35 PM UTC

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+58
  • Celebrity
  • Jul 22, 2021 6:10 PM UTC

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


khaphan
  • Author
  • Jul 24, 2021 11:25 AM UTC

Thank you so much! I will try your idea!