Decision Table - Not getting expected value back in response.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 09:28 AM
I am putting a business rule together that takes a set of values from the form after it is saved and applies checks several possible boolean fields if the conditions apply.
I am able to get the false value to return, but the true value comes back as undefined.
var current = new GlideRecord("sn_vdr_risk_asmt_vdr_tiering_assessment");
if (current.get("2fa55b5cc3314a10fefddcef0501318f")) {
try {
var inputs = {};
inputs['u_inferences'] = current; // Reference, Sys ID of the record
var dt = new sn_dt.DecisionTableAPI();
var response = dt.getDecisions('5f86416e93a94210561430747aba1073', inputs);
var result_elements = response.result_elements;
current.u_biometric_information = result_elements.u_biometric_information.getValue(); // True/False
current.u_commercial_information = result_elements.u_commercial_information.getValue(); // True/False
current.u_geolocation_information = result_elements.u_geolocation_information.getValue(); // True/False
current.u_identifiers = result_elements.u_identifiers.getValue(); // True/False
current.u_inferences = result_elements.u_inferences.getValue(); // True/False
current.u_internet_network_activity = result_elements.u_internet_network_activity.getValue(); // True/False
current.u_none = result_elements.u_none.getValue(); // True/False
current.u_sensory_data = result_elements.u_sensory_data.getValue(); // True/False
current.u_sensitive_personal_information = result_elements.u_sensitive_personal_information.getValue(); // True/False
current.u_protected_classification_characteristics = result_elements.u_protected_classification_characteristics.getValue(); // True/False
current.u_professional_employment_info = result_elements.u_professional_employment_info.getValue(); // True/False
current.u_other_personal_information = result_elements.u_other_personal_information.getValue(); // True/False
} catch (e) {
gs.log("Couldn't run this script Error: " + e);
}
gs.info(current.u_biometric_information);
gs.info(current.u_commercial_information);
gs.info(current.u_geolocation_information);
gs.info(current.u_identifiers);
gs.info(current.u_inferences);
gs.info(current.u_internet_network_activity);
gs.info(current.u_none);
gs.info(current.u_sensory_data);
gs.info(current.u_sensitive_personal_information);
gs.info(current.u_professional_employment_info);
gs.info(current.u_protected_classification_characteristics);
gs.info(current.u_other_personal_information);
}
I am running this currently as a background script against a record I would expect the u_commercial_information to be true, but it's getting undefined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 10:26 AM
Hi @Aaron Duncan ,
Does field name [u_commercial_information], exist?
What do you get if you add line?
gs.info(result_elements.u_commercial_information.getValue());

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 11:17 AM
I added the line, and I get undefined. Also, I did validate the field does exist on the form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 10:30 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 11:19 AM
Here is the input and the initial condition with the results.
Here is an example of a condition that should trigger the field to be set to true. The 3rd Column is the value for the Commercial Information field.