I may be missing something very obvious but failing that you could add steps to your script
to capture the current record number you are editing "Get(RecordID)" and then after commiting the record go back to that record in the next step. Go to Record/Request/Page[...]
RecordID is a unique record identifier
(Get(RecordNumber) RecordNumber is the nth record in the found set.
if your script changes the found set then you need to use RecordID and add Show All Records to the script as the Go to Record/Request/Page[...] goes to the nth record in the found set.
Set Variable [$CurrentRecordID; Value:Get(RecordID)]
Commit Records/Requests[no dialog]
Show All Records
Go to Record/Request/Page[$CurrentRecordID]
I hope this points you in the right direction, Im sure others will have more ideas for you.
thanks for your suggestions. It just hasn't worked out, primarily because the RecordID is only unique in the given set and is not unique in an absolute ('key") way. The record it locates depends on its value within the current found set or table that is being processed. In my case the record I need is in another table.
In my script I first process the member table (table1). The found members (selected with a Perform Find step) are then displayed using the layout. The trigger record in table2 (table2 has no direct relationship with table1) is the holder of the job parameters for processing table1 and also the place I want to save the totals. So I end up with a layout which displays fields from table1 (multiple records) and also a couple of fields from 1 record from table2. Because table1 and table2 are not directly related it's hard to hold them both "current" on the layout.
What I need to do is to "get" at that one record in table2 without disrupting the "current" found set, which is what I have on display in the layout. Is it possible to first stipulate the 'target' table (table2 in my case) and then use the RecordID to identify the record needed within the table? If that is possible, I think it would work.
Or is my thinking incorect? Maybe there's another way for Filemaker to create records in a table separate to the table being processed?
Thanks again for your interest and expertise,
Could you add a key field to each table then add both keys to variables, complete/ commit your records then find both records again using the keys or their RecordID in each table.
Is there no way of building a relationship between the two tables?
You could tag the found records with a simple 1 or 0 field entry using the replace field contents (having cleared all the records before the initial find or as the last step in the script) you can then easily refind all the previously found records without having to recreate a complex find structure. This can be done for both tables.
ie build your found set of records
set foundRecord field to 1 in both tables using replace fields contents
perform find on each table using foundRecord field = 1
switch to your preferred initial layout
finally set foundRecord field to 0 on all the found records ( ready for next time)
I hope one of these may give you some ideas.
thanks for the ideas. I'll try the stuuf out and let you know.
i've got it working, thanks to a mixture of your suggestions and a little bit of experimenting. It actually great fun playing with the possibilities and a great way to learn filemaker.
It never fails to amaze me what you can achieve with filemaker and combinations of scripts, layouts, relationships and formatting.
Have fun learning