Automaticly copy value of one field to another field on same table

Igor Baldi
Tera Contributor

Hello, I want to know how to copy value from one field to another. It should be automatic for every other entry.

"customer_contact" table, it should copy value from field “email” to “user_name”.

I tried to create BR, but it did not work.

Any suggestions?

1 ACCEPTED SOLUTION

Saiganeshraja
Kilo Sage

In business, rules use actions to set the value. (If both are of the same type) as email and user id fields are the different types we need set from the script :

When to run: before (insert,update)

current.user_id = current.email.toString();

 

 

Mark correct and helpful.

View solution in original post

8 REPLIES 8

Saiganeshraja
Kilo Sage

In business, rules use actions to set the value. (If both are of the same type) as email and user id fields are the different types we need set from the script :

When to run: before (insert,update)

current.user_id = current.email.toString();

 

 

Mark correct and helpful.

I already try that, but if I try to set actions User ID> same as> email. But email is missing

It's because the email field type and user id field type are different. You need to use the script mentioned above.

I tried this script but it does not work. I set parameters as you wrote down.