AnsweredAssumed Answered

Find\search found set without changing active record

Question asked by dangelsaurus on Feb 12, 2017
Latest reply on Feb 14, 2017 by philmodjunk

In a script, I want to be able to search my current found set for a field that matches a value, and simply return the ID of that record to the script WITHOUT actually changing the active record...

 

For example. Let's say I have a Projects table and a Tasks Table.

Projects

ID     ProjectName

 

Tasks

ID     TaskName     ProjectID     AssignedUser      DependentTaskID     Completed

 

My found set is a list of all task for a related project, I'm viewing a single task (form view), When I mark a task as completed, I want to run a script that searches all the other tasks in the found set, and if it finds one in which the "DependentTaskID" matches the "ID" of the active task, it notifies that "AssignedUser" that the dependent task has been completed.  So if I just completed the "Cut Potatoes" task, the owner of the "Cook Potatoes" task is notified.


I tried to do a loop, but it changes the active record to the last record.  I want to loop\search, do an action, without actually changing the active record.

...

Go To Record/Request/Page [First]

Loop   

     If [Tasks::DependTaskID = $CurrentID}

          ....(do stuff)

     End If

     Go to Record/Request/Page [Next; Exit after last]

End Loop

Outcomes