AnsweredAssumed Answered

How to get a script to function on found set

Question asked by xxx202xxx on Aug 7, 2017
Latest reply on Aug 8, 2017 by jackrodgersjr

Scenario:

I am attempting to run a script where I am looking for [ServicMGMT::Status >= (Get (CurrentTimestamp) -7*24*3600)].

 

Problem:

I have this script that is ran on the server side that queries the database.  My problem is that it only acts on the first record of the found set.  I will need it to evaluate all the records in the found set which is rouglhly 15 to 20 records.

 

go to layout

enter find mode

set field [ServicMGMT::Status; "Pending"]

perform find

sort records [Ascending; ServiceMGMT::ModifiedTime]

Go to Record/Request/Page [First]

If [ServiceMGMT::ModifiedTime >= (Get (CurrentTimestamp -7 * 24 * 3600)]

     Send Mail to AccountName

End if

show all records

exit script

Outcomes