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

    Also you said you "don't need to filter", but then your "update" portion idicates that you actually do need filtering.  As far as I can tell, you should actually be doing this filtering on your initial query.

    Additionally if you're trying to update the value in a table MY_TABLE based on the view results you originally queried from your separate view, you would want to use an intermediary step to query whatever entries from MY_TABLE you actually need to update, after your original View query (presumably).

Children
  • In my view, I have two tables joined (table1 / table 2). Table 1 has the correct values I want, table 2 they are null. So I created a view with both tables that return the filtered data I needed. Then I need the process model to get the view and update table 2 to table 1 correct values where the roleid are the same (1-to-1). So I wouldnt say its filtering, I just need the values updated to their respective ids that match totable 2 from table 1.