Ditching Finds and Using GTRR Instead

In the past, when selecting items from a list in order to do, say, a mail merge or some other sort of bulk processing, I’ve used a clunky combination of “select” indicators on each record, followed by a Find finding all recs with the selection indicator set), then a loop through the found set.

Having realised the error of my ways, I now use the technique described in “Selecting Items from a List“, which basically puts the primary key of each selected item in a global variable (say “$$SelectedPeople”), using a neat custom function to toggle between selection and de-selection.

Once the global variable is set, getting the records for bulk processing is embarrassingly simple – just bung the contents of the variable into a global “match” field on the table you’re interested in, and do a Go To Related Record.

E.g.

Within the GTRR script step, having checked that there are people selected, you can specify:

  • the layout to be used (in this case a letter template for mailmerging),
  • whether to use a new window,
  • which records to show – in this case, of course, only related records.

And that’s it.  One script step to replace a clumsy sequence.

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s