Record Producer to set value in table

Elizabeth26
Tera Contributor

I am trying to set a value in the destination table of where a record producer is sent.

 

I tried within the script part of the record producer and also catalog client script but neither seem to work. I am not sure which option is better. I have tried in the script producer and current. It works for other things I am mapping this way in the script but not sure why it's not working for these? 

 

if (producer.x_location_type == 'Facility') {
current.x_on_premises_selection = "Building";

}

if (producer.x_location_type == 'Non-Site Facility') {
current.x_off_premises_selection = "Site";

}

17 REPLIES 17

@Elizabeth26,

It sounds like you have set the value on the fields.  When you see a value in the XML but nothing is displayed on the form there is no display value for the value you set....make sure you have choices with the same values. 

@Elizabeth26 

Check the dictionary entries of that table. Like @ricker said, what field type are they? Are they String?


If I helped you with your case, please click the Thumb Icon and mark as Correct.


They are choice fields

@Elizabeth26 

You can try the .setDisplayValue() command like:

current.x_on_premises_selection.setDisplayValue("Building");

 


If I helped you with your case, please click the Thumb Icon and mark as Correct.


I tried this and it's still empty.