The CreatorCon Call for Content is officially open! Get started here.

In the transformation map, how to fill field opened by in the target table with the logged in user

Lucas Rodrigues
Tera Contributor

I have a transform map that takes an excel table and transforms it into an occurrence in a table. This table has the field open by. And this field is always filled in as system in ocurrences that were created by import from Excel. I want this field to be filled with the user who imported from excel.

I tried to do it, creating a field map as the image below, but it did not work:

LucasRodrigues_0-1709759690848.png

I don't want to do this using Business Rule. I want to do this using transform map scripts. Is there a way to do it?

 

5 REPLIES 5

Tony Chatfield1
Kilo Patron

Hi, who is shown as sys_created_by?

SanjivMeher
Kilo Patron
Kilo Patron

Can you also specify reference value field name as sys_id and try?

Or an onBefore Transform script as 

target.opened_by = gs.getUserID();

 


Please mark this response as correct or helpful if it assisted you with your question.

Sandeep Rajput
Tera Patron
Tera Patron

@Lucas Rodrigues Add sys_id in the Reference value field name and the opend_by field should populate.

 

LucasRodrigues_0-1709759690848.png

Aman Kumar S
Kilo Patron

Hi @Lucas Rodrigues 

 

Can you check the history for Opened by?

If opened by is changed to system after your field map scripting, in that case, you can try using onAfter transform script to set the opened by value.

 

Best Regards
Aman Kumar