Skip to main content
Solved

How to fill unmerged cells with values from previous rows?

  • August 17, 2023
  • 2 replies
  • 89 views

I have an excel file that does not have any merged cells. Any cell that is left blank is supposed to take the value from the previous row. How do you do that in FME without looping through a list?

 

This is what I have

image.pngAnd, this is what I want (with grey-color being the items I want to automate with FME)

image.png:

 

Best answer by nielsgerrits

In the AttributeCreator, under Advanced, you can Enable Adjacent Feature Attributes which will let you access prior or subsequent features. You can then use conditionals to set attributes, like you would do in Excel. (If A has a value, do nothing. Else, use A from the previous row.)

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

nielsgerrits
VIP
Forum|alt.badge.img+62
  • Best Answer
  • August 17, 2023

In the AttributeCreator, under Advanced, you can Enable Adjacent Feature Attributes which will let you access prior or subsequent features. You can then use conditionals to set attributes, like you would do in Excel. (If A has a value, do nothing. Else, use A from the previous row.)


david_r
Celebrity
  • August 17, 2023

In the AttributeCreator, under Advanced, you can Enable Adjacent Feature Attributes which will let you access prior or subsequent features. You can then use conditionals to set attributes, like you would do in Excel. (If A has a value, do nothing. Else, use A from the previous row.)

Exactly, simply adding a screenshot:

imageSee also here: https://engage.safe.com/blog/2017/08/adjacentfeatureattributes-evangelist166/