FileMaker Forum

2answers

Popover Lab

I followed instruction in this FileMaker document, but can’t seem to get the Popover to open with the “Go to Object” Script step. All it seems to do is highlight it. So then I put a field in the Popover and gave it an Object Name and it works. I don’t know if this can be a problem but it now highlights the field. I did not want this, I just want of show what is in my Popover and close after. Can anybody shed so light or tell how opening the Popover can be done. Thanks

Chris Johnston

2answers

Go to Object( "ObjectName" ) Gotcha for New Players

Let me explain. I have an abstracted record deletion script. By that I mean I want it to be able to go to any layout and find a name field an use it to find a record for deletion. This means it can be used to delete records on layouts with different tables. It goes like this;

Go to Layout( "SomeLayout" )

Go to Object( "PrimaryID" )

Enter Find Mode

Set Field ( $PrimaryID )

Perform Find

If found count is 1

Delete Record

End If

This script fails if the found count is 0 to start with. It's not a problem if you do a Show All Records first but it is a gotcha for new players.

The problem is that when the object is a field it seems that as far as FileMaker is concerned the object does not exist unless there is a record. You can have other objects on the layout with a 0 found count and the Go to Object() function will work for them.

So my question is "Is it a bug or a feature?"

Simon Plint