I want to return unique values from a data store using just a rule and query. Th

I want to return unique values from a data store using just a rule and query. This is what I have so far but I can't seem to figure out how to leverage the target field array. for the union function to operate on.
=union(todatasubset(rule!GetAllLrules().PUB),todatasubset(rule!GetAllrules().PUB))
So the .PUB part delivers the data sub set how do I then navigate to the field within it?
Ideas and outright solutions most welcome.
Thanks, James

OriginalPostID-147436

OriginalPostID-147436

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    Glad to help, thanks for letting me know!

    FWIW, the reason I included the first approach is because, perhaps not here but elsewhere, it can sometimes be useful to access the other elements in the CDT after the query is run, whether used directly by the rule output or not. For instance, in another case, you could include a text rule input for "Field", and pass in the field name you want to return the uniques of; you could then pass that into the "property" function - so like this, you could use the same rule for "Pub" and "Class". Just for example.
Reply
  • 0
    Certified Lead Developer
    Glad to help, thanks for letting me know!

    FWIW, the reason I included the first approach is because, perhaps not here but elsewhere, it can sometimes be useful to access the other elements in the CDT after the query is run, whether used directly by the rule output or not. For instance, in another case, you could include a text rule input for "Field", and pass in the field name you want to return the uniques of; you could then pass that into the "property" function - so like this, you could use the same rule for "Pub" and "Class". Just for example.
Children
No Data