Solved

For or while loop in detection rule

  • 21 March 2022
  • 3 replies
  • 82 views

Badge

How can we use functionality like ‘for’ and ‘while’ loop in detection rule field while writing/creating rules for capturing data/records.

icon

Best answer by alex 24 March 2022, 14:22

View original

3 replies

Hi Taruna,

By design detection rules are meant to be used for rule-based term detection during profiling, meaning, that the expected outcome would be boolean (true/false) so the result can be measure against a given threshold and the application would determine if this term should be applied based on the aggregated result for all given records. Therefore, I am not sure I understand the need to use for/while loop in a detection rule. However, I would be happy to proceed with the discussion in the support ticket you have raised. 

Best Regards,

Alex

Badge

I can find "set" in ataccamma detection rule fields but I cannot find array.
For example I can find set.differenceResult but I cannot find arr.differenceResult
I have attached screenshot.

Can you reply why cannot I find arr.differenceResult?

Hi Taruna,

Those particular functions are consider as an experimental feature, since they were recently implemented and therefore, they are not suggested as part of context assist. However, this doesn't mean that they wouldn't be working, given the fact that they are configured correctly, according to the documentation, and the expression passes the validation, it would be usable. Keep in mind that with rules, you are working on the record level, so you don't have access to array of records, unless you construct them manually in the expression or load it from some external source. Therefore, the scenarios where end-user would benefit from using such functions in the scope of these DQ rules can be rather limited. 
 

Best Regards,
Alex

Reply