Solved

How to keep only the first two elements of a list?

  • 19 March 2021
  • 2 replies
  • 32 views

Badge

Hi FME experts,

When reading data into a FME workspace, there is a list attribute in each input feature. Some features have 2 elements in the list and some features have 3 elements. For some reason I only want to keep the first two elements of each list. How can I do that?

 

I searched for the List related transformers, but couldn't find one that can do this List truncation for me.

 

I am using FME Workbench 2018.1

 

Thank you!

 

Sui

icon

Best answer by markatsafe 19 March 2021, 19:38

View original

2 replies

Badge +2

@sui_huang​ Would ListSlicer from the FME hub work for you?

Badge

@sui_huang​ Would ListSlicer from the FME hub work for you?

Hi markatsafe, it works for me, thank you!

Reply