Skip to main content

I'm trying to rename an attribute based on a user parameter. For this, I used the BulkAttributeRenamer since both AttributeRenamer and AttributeManager don't seem to accept user parameters as valid inputs for an attribute name.

 

This worked fine for the first time, renaming the attribute appropriately to the value of the user paramter. However, when I change the value of the user parameter, the new name doesn't seem to propogate through to the output.

 

In the picture you can see I try to replace _2 with _$(YEAR_2). The first time I ran this, I used a parameter value of "2010" whch worked fine. Now when I change the value of this parameter, the output still shows only _2010 instead of the new value.

 

I need to do this so that the output file has the correct attribute names, instead of the temporary ones I use during the workflow.

 

Does anyone know how to accomplish this? Thanks!

@cragos-skane​  This is an artifact of the FME Workbench schema that occurs during authoring. Workbench can resolve the Parameter (2010) and adds the new attribute to the workbench schema. But when you RUN the workspace, you are now creating a dynamic attribute name. However, you will still be getting the result you expect. If you inspect the data in Data Inspector / Visual Preview in the Feature Information window, you'll see the newly named attribute (_2021 say). In the image below you can see that the 2020 attribute is marked as <missing> since it no longer exists on the data, but 2021 had the correct value.


Reply