You'll have to describe better '...some particular actions...will bring up a dialog box...." What do you want the dialog box to say?
1. So no matter what record you are on, you want to open a second window to display one specific record? Assuming it will always be this particular record, you can hard code it as follows:
a) If this is the case, the easiest would be to first find the primary key for this record (say it's 235). Then pseudo script:
Enter Find Mode
Set Field [Table::Primary_key_Field; "235"]
2. Or do you want to just open up a second window of the same record you are looking at?
You can use Go to Related Record (GTRR) script step in the script you are in. If its the same table and layout, it will just open up to the same record, and same found set. If you want to isolate the record you can:
a) Use GTRR, new window. Then use Show All Records, Omit Record, Show Omitted Only script steps. You can also resize the window and move it so it isn't right on top of the other window.
Thanks Steve, sorry if I explained n a way that is not understood.
But, you guessed right in your first point. question, primary key, is that an invisible number/something in the record? I do not understand the term.
A primary key is a field set up with an auto-entered value that uniquely identifies every record in your table. In FileMaker, this is most often a field with an auto-entered serial number or possibly a text field that auto-enters the result of Get (UUID).
Steve is using a generic name for a field you should already have in your table. Use your field name in place of his.
I do not have no auto-entered serial number, can you put those in afterwards? As that would be a great idea! There is a creation date and modified date in it, but no auto-entered serial number field. If I do a auto-entered serial number field retro, how do I get the numbers in?
For almost all tables, you should have a Primary Key and it should be your primary match field to use in relationships.
You can add the field and define the auto-entered serial number field option, but then you have to update the existing records so that they also have a serial number. Here's how:
Go to a layout based on this table. Add the new serial number field to this layout. Show All Records. Click into the field and use Replace field Contents, selecting the serial number option and also the option to update the auto-enter settings on this field. This will assign a serial number to all records in the table and update your "next serial value setting" on the field all at the same time.
Side historical note: There once was a time when the only way to use a script to change the next serial value setting, such as after a data import into an updated copy of the file, was to set up a found set of one record and use Replace Field Contents with these two options in order to update the "next serial value" setting.
OK Clear, thanks Phil! Going to give it a whirl. Once done I tackle the other one.
Thanks Phil, that worked a dream. Now the other task, but that will be tomorrow, to late now.