Skip to main content

I have another newbie question please.

I am reading the input data (ID, NAME1, NAME2) in the example below and creating the new attributes FIRST and LAST.

The value of the new "FIRST" attribute is set (to NAME1) when reading the first row for a particular ID. However, the new "LAST" attribute is set (to NAME2) when processing the row associated with the last entry of a particular ID.

How do I backfill the value of the "LAST" attribute so that is available for the first row of an ID? (I need this in order to satisfy the required output format).

I am aware of the look ahead (and behind) feature in AttributeManager/Creator. However the number of rows to look ahead is not known when reading the input data. In the example below it is 2 then 4 but it could be anything between 0 .. 100+.

Example:

IDNAME1NAME2FIRSTLAST1aAAAGEFAAA1aGEFCX2CX23yXCRBX4XCR3yBX4GXO3yGXOADL3yADLDARDAR

 

* look ahead is 1 then 3.

Hi @sunorchids, you can use the Enable Adjacent Feature Attributes option in the AttributeManager or the Attribute creator, in conjunction with conditional value setting, as in:


Hi @sunorchids, you can use the Enable Adjacent Feature Attributes option in the AttributeManager or the Attribute creator, in conjunction with conditional value setting, as in:

Thanks for the prompt response @takashi Unfortunately I don't think my question was very clear. Your solution leads me exactly to where I am now. The desired output is below (note changes in bold to the LAST column). Note that I need to be able to access the value of the LAST attribute when outputting rows 1 and 3.

 

ID

 

 

NAME1NAME2FIRSTLAST1aAAAGEFAAACX21aGEFCX2CX23yXCRBX4XCRDAR3yBX4GXO3yGXOADL3yADLDARDAR

Hi @sunorchids, you can use the Enable Adjacent Feature Attributes option in the AttributeManager or the Attribute creator, in conjunction with conditional value setting, as in:

This workflow is a possible way. The first AttributeManager is the one I suggested above.

 

Conditional Value Setting in the AttributeManager_2

 

 


@takashi again thanks for the quick response 🙂 I will try your suggestion at work tomorrow ...


Works like a charm thanks @takashi


Reply