This can be achieved at its simplest by setting a field as a button to go to a particular form layout, but I recommend setting up a small script as there may be other things you'd like to do (minimise window, rename window etc), that you can add to your script.
This script can then be attached to a field, or a separate button, Right click on your field/button and go to Button Setup to set your script to that object.
Thank you, symbister! I haven't made a script before, though the developer who made this database employed several of them, including an "Edit" button in the footer of the list view. I will attempt to figure this out :). I only have Filemaker Pro 12 -- not Filemaker Advanced 12 . . . any concern about not having the "script debugger" handy? I don't want to break things :).
You can't really 'break' things too much unless you start doing things like putting 'Delete Records' in an unguarded moment! But if you are worried - indeed it's good practice - keep a backup of the whole file before you make significant changes.
FMP Advanced is very useful if you're doing a lot of scripting - but there are simpler ways to see how your script is going without the extra expense. If you're setting variables and fields, you can check on their contents by inserting a Show Custom Dialog step.
Symbister, thank you so much. I am still working on this. I have created a script to Open Record/Request and New Window [Style: Document]. Then, in Layout Mode, I chose one field and made it a button which runs the script. Unfortunately, when I press the field (button) it just opens another ListView Layout window exactly like the one I already had. I would like it to open that record in a FormView Layout window instead. What am I doing wrong, please?
Again, thank you(!!) for your help for this newbie!!!
indeed it's good practice - keep a backup of the whole file before you make significant changes.
I strongly agree. When developing a new solution, I frequently set up a pair of scripts to save frequent backups automatically. That way, I don't have to remember to save the backups.
If interested, see this thread: Saving Sequential Back Ups During Development
Have a look at the 'Edit' button you mentioned before - open the script and see what layout it refers to, and Go to File | Manage | Layouts - you will see a list of all layouts in your solution and the tables from which they derive their records.
If your new button takes you to the same List View layout, you'll need to point it at (Go To Layout) a layout which is set up in Form View to edit records, or merely have a step to View As (List) on the same layout - absolutely depends on which fields you need to edit, may only be a couple so you could define a new layout with only those fields. And of course you'll need to add a button to take you back to your list view if necessary...
All layouts can be set up as either List, Form or Table (or all three) - unless you restrict them to a particular view in the definition of the layout - In Layout Mode go to Layouts | Layout Setup, you'll see a dialogue box defining the various aspects of your layout
no probs... :)
I am not sure if I missed something in this thread, but I still do not see a way to make the button or the field, etc. DOUBLE-clickable. When creating a button and assigning a script, the script initiates upon a SINGLE-click of the button, right? Is there a way to makle a button that only initates the script upon a double-click?
While proper interface design would dicate a single click for a button on a layout, in this case it will not work fo rme. What I am tryingto do is to create a list view where the user can select a row (record) by single clicking on the row. This is simply to highlight the record, so users can know what record is selected. If they want to see the detail (enter form view), they would then double-click on the record to change views. I would say this is the most "normal" behavior expected when navigating within most applications.
I can create an invisible button and ovelay it on the entire row (record). But then as soon as the user clicks on the row, it will initiate the script and change views. I need to be able to wait for a double-cliock before initiating the script.
Is there any way to do this?
I suggest that you either use two buttons or detect that a modifier key is down to get the different behavior instead of a double click.
It's theoretically possible to capture the current Time in a global variable as a way to detect that you have clicked the button twice within the same second, but it's rather "clunky".