I want something quite simple in Datamapper but I can’t find a way to make it work.
In designer if statements work,but in javascript expressions it won’t
to assign the result of replace() to record field sexeaanhef (but which needs to be already available from a previous extraction step or if it’s a custom field).
Whereas in an extracton step the last string expression of a script would be assigned to the record field of that extraction, so result of line
brief_aanhef.replace(….);
would be assigned to field sexeaanhef (if that is the recrod field of the extraction).
And please note in an extraction step for field sexeaanhef you cannot do
record.fields.sexeaanhef.replace();
because the field object isn’t available at that time (but after the extraction step), hence gives an error when trying to apply method replace().