Record Producer to set value in table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2023 10:44 AM
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";
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2023 11:29 AM
Try to see if this works.
var location = producer.x_location_type + "";
if (location == 'Facility') {
current.x_on_premises_selection = "Building";
}
if (location == 'Non-Site Facility') {
current.x_off_premises_selection = "Site";
}
If I helped you with your case, please click the Thumb Icon and mark as Correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2023 11:46 AM
Hi,
It still does not input the values in the table the record producer is created in. The field values are empty for both.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2023 11:58 AM
Make sure those are the correct field names. What type of fields are they? You can check the XML to see if they have a value but no display value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2023 08:46 AM
The field names are correct. They are choice fields. In the XML I see location type value but nothing for both on or off premises.