Thank you for your response @jstoner.
Apologies for the delayed update.
I have a quick question—can we use multiple conditional logic statements (such as multiple if-else) in the outcome section? For example, if I want to derive a value from another field, is that possible?
I have a "severity" field in my UDM with values 1, 2, and 3. I want to create a new field called "severity_level," where if the severity value is 1, it should be categorized as "Critical," if 2, as "High," and if 3, as "Low."
Is this achievable?
Hi @AashShah,
Does the below proof of concept help you to achieve your use case:
This is under the assumption that the UDM field you are referring to which contains the 'severity' is 'security_result.risk_score',
This is under the assumption that you want to match (aggregate) the results based on a UDM field 'principal.ip'
security_result.risk_score = $severity
principal.ip = $IP
match:
$IP
outcome:
$Sev = array_distinct($severity)
//$severity_level_field_string = array_distinct(if($severity = "1" , "Critical", if($severity = "2", "High",if($severity = "3", "Low", "N/A"))))
$severity_level_field_non_string = array_distinct(if(strings.concat($severity, "") = "1" , "Critical", if(strings.concat($severity, "") = "2", "High",if(strings.concat($severity, "") = "3", "Low", "N/A"))))If the value within the UDM field you are calling is a string, use the variable in the outcome section with the value 'severity_level_field_string', otherwise if it is of a int / float, utilise the outcome section with the value 'severity_level_field_non_string'.
Kind Regards,
Ayman