Jump to content

Send something to the back with a script?


This topic is 8091 days old. Please don't post here. Open a new topic instead.

Recommended Posts

A couple of things you can do:

1. Use the portal trick. By creating a portal and placing the field into it, you can make it appear and disappear based on the state of another field. You can download a sample file from databasepros.com. Look for a demo file called Visibility.

or

2. You can place a big container field in front of the fields that you are trying to cover. The container field will display a "mask" graphic from a related file. The graphic contains various opaque areas that will selectively cover the fields behind the container field. I used this solution a few years ago when I was generating electrical wiring diagrams directly from Filemaker. It worked in FM 2.0, and then when version 3 came out it wouln't work because container fields were always displayed behind all other types fields regardless of where you actually placed them. I believe this is now fixed in version 5.x, but I haven't actually tested it lately.

or

3. If you are superimposing several fields, then the above two techniques won't work, but you can accomplish something workable by setting the field format for all fields to not allow entry. Place a calculated field in front of all the other fields. It's formula will be:

Choose(SelectField-1, Field1, Field2, Field3, Field4)

where Field1...Field4 are the fields that you have superimposed, and SelectField contains a number indicating which field you want to display.

Then turn the calc field into a button which executes a script like this:

code:


Exit Record/Request

If [selectField = 1]

Go to Field[Field1][select]

Exit Script

End If

If [selectField = 2]

Go to Field[Field2][select]

Exit Script

End If

If [selectField =3]

Go to Field[Field2][select]

Exit Script

End If

If [selectField = 4]

Go to Field[Field4][select]

Exit Script

End If

What this does is check the SelectField contents to see which of the fields is active, and then enters that field so that the user can enter or edit it.

Link to comment
Share on other sites

This topic is 8091 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.