Update table with a loop in a Process Model

Hello all - 

I have a process model, where the first task is to call the database for a view (image1).

This view has a unique column that is saved to a CDT with other columns (roleid and rest of columns).

I save the output of the query database results to an array variable that has the view CDT.

My next task would be to iterate through the array variable to update the table that matches the roleid.

How can I loop through each array with roleid from the variable and match it to the table roleid? I don't think using a Query Database with the following is correct as the variable propert doesn't seem accessible.

Thank you for your help.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to here2learn
    But if I created a view already in the database, there is no need for me to an expression rule to filter.

    Views need to be queried via the Query Entity function.  First you would need to create a CDT to match the view (if you already have, that's fine), and a Data Store entity matching that CDT which would be kept in whatever Data Store object you use to reference your Views (if you created your CDT directly from the View, it's likely this may have been handled automatically).

    Then, you would build a basic use case a!queryEntity() call for that DSE in its own unique expression rule.  This is not required but helps a lot.

    Inside the expression rule you can configure any (or no) filtering, handle default paging options, etc.  You can then simply test the query in the expression rule editor, and be sure what the output will be for any given input(s) when called in your process model.

    Here's a QE expression rule for a template "reference data" table.  It would be functionally the same when doing it for a View - the key consideration is which constant is passed in for the "entity" parameter.

Children
No Data