Hi does anyone know how to execute a dynamic replace field script step ? It is possible to do it for a set field using set field by name but struggling to find the equivalent for Replace Field ...
by advance thanks
For the most "dynamicness" possible you can set the field to be of calculation data type, insert whatever calculation you want into the field definition, and make it unstored. That way when ever the field data or any field referenced in the calculation changes the calculation will refresh.
Thank you markpelleymounter
The issue is more on Replace Field Content than on set field by name.
To be more specific,
I can generate easily a variable that contains the script step to run (using a let)
$variable = "Replace Field Content [with dialog: Off; Table::Field ; CalculatedValue]"
but I haven't found the way to run the script step in the $variable
The $variable is needed to use Table::Field as a dynamic value
Ideally, this could be done with a command like Replace Field By Name ...
You are correct that the Replace Field Contents script step can not be dynamic in your sense.
Replace Field Contents must have a chosen table::field.
The action of replace field contents can be repicated by running a script on the found set like this....
set field by name
go to next record, exit at last
Just make sure that you use some error checking to see if Set field By Name throws an error on any processed records and takes intelligent action to preserve data integrity.
Following the rules of atomicity is a generally accepted best practice.
Atomicity (database systems) - Wikipedia
Todd Geist has done some excellent work on transactional processing with Fm that i highly reccomend
Why do you need to do this? Can you describe your file in meaningful language?
Sounds like a data structure problem. And if so; that’s the problem to solve.
Retrieving data ...