Skip to main content

i have some cells contains 

Aaaa||ccc||ddd||bb||fff

i would like to reverse them in case condition happens to get 

fff|||bb||||ddd||ccc||Aaaa

FME 2021

Thanks in advance 

If I understand correctly, you have some data in one attribute, where you want to invert the order of the words. It is not clear why there are extra | characters in your desired results, I ignored those for now.

  1. Use an AttributeSplitter to split the attribute into a list on ||
  2. Explode the list to individual features. This gives you  an attribute _element_index that gives the order the features had in the list
  3. Sort on that attribute in descending order
  4. Aggregate the features in an Aggregator, concatenate the attribute that came from the list.

 


Reply