Hello, I’m trying to dynamically add a suffix to selected attributes using BulkAttributeRenamer. I want the suffix to be the day the script is run and expressed in YearMonthDay.
Example: the attribute is “addresses_count_“ and using the BulkAttributeRenamer and running the script on the 24.10.2024 I want it to be “addresses_count_20241024”.
I tried using UserParameters. The first parameter I made was a Text Type Parameter where before the script is run the User needs to input by hand the Date. It has a few flaws. For example, the user may enter the wrong date, the date is not entered automatically by the script and will not always be processed correctly by BulkAttributeRenamer.
The second UserParameters I made and think it is the right way to do it is a Scripted Type Parameter. Below you can see what I made.
I have not been able to get this to work using the BulkAttributeRenamer. Even when I select the string to be a UserParameter it doesn't seem to add and generate a correct date string.
Maybe I wrote the code wrong, or there are other problems I’m not aware of.
I would really appreciate your help in solving this and maybe suggest a better solution. The main reason I need it somehow to work is, I’m generating in another script using SQLExecutor new columns with the Date I run the script.
In the future, I need column names with dates to compare specific days to each other and calculate the change in specific regions.
I’m using FME Form 2023.2.0.0 (Build 23764). Any insight or advice?