Fetch custom field data automatically to a catalog item variable dynamically.

1_DipikaD
Kilo Sage

Hi All,

 

Please help me out to find the solution of  mentioned requirement .

 

Requirement is I have 3 custom field (string) in a table . Also I have a catalog item with same variables. I want to fetch value from 3 custom field to variables in catalog item dynamically.  If  I write 'test' on  custom field of the table then it should automatically reflect on that catalog item variable. If I leave blank then variable should be blank.

 

I also tried a client callable script include but did not get desired result.

Please reply asap .

 

 

@Ravi Gaurav ,@Sandeep Rajput, @AG - LearnNGrow, @Ankur Bawiskar 

12 REPLIES 12

Brian Lancaster
Tera Sage

You need a before update business rule that runs when on of the fields changes. Then in the business rule you can do something like this.

current.variables.variable1 = current.field1

current.variables.variable2 = current.field2

current.variables.variable3 = current.field3

I tried it but not getting the result. 

Could you please let me know how will it get field value , because there is no option to map the fields of the table to variables ?

 

@Brian Lancaster 

current.field_name will get the value. Can you share the business role you tried to create?

(function executeRule(current, previous /*null when async*/) {
current.variables.stressed_exit_strategy_details = current.u_stressed_exit_strtaegy_details

current.variables.data_required_for_stressed_field = current.u_data_required_for_stressed_field
current.variables.frequency_of_copies = current.u_frequency_of_copies
    // Add your code here

})(current, previous);