Skip to main content
Solved

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


Forum|alt.badge.img

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

Best answer by markatsafe

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

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

2 replies

Forum|alt.badge.img+2
  • Best Answer
  • March 19, 2021

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


Forum|alt.badge.img
  • Author
  • March 19, 2021
markatsafe wrote:

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

Hi markatsafe, it works for me, thank you!


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