FredP Posted March 3, 2008 Share Posted March 3, 2008 Is there a way to use Goto Related records, but to have it inform me if there are no related records? As of now, it just does nothing in this case, but for a script I am working on, I need to know that there were no found records. I am currently using Goto Related record Get Related from : MyTable Show Records using layout :MyLayout Show Only related records is checked Match all records in current found set is checked. Thanks Link to comment Share on other sites More sharing options...
Maarten Witberg Posted March 3, 2008 Share Posted March 3, 2008 Hi Fred You can use error capturing for that. Something like this [i]#script opening[/i] set error capture [ on ] [i]#more script[/i] go to related records [ your settings ] if [ get ( lasterror ) // no related records ] [i]#do stuff[/i] end if [i]#more script[/i] see if it works for you Link to comment Share on other sites More sharing options...
Jack Rodgers Posted March 3, 2008 Share Posted March 3, 2008 You can also count the number of related records and if it is > 0, run the script. If ( count ( related record id field ) > 0 ...go to related record end if Link to comment Share on other sites More sharing options...
Recommended Posts