Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Stop/Start buttons?

Featured Replies

Hi.

I'm trying to work out how to add a 'simple' three-state button to the top of a layout, using a container field with three repetitions. I'm trying to glean the technique from various threads here, but I'm getting nowhere...

I've attached a couple of the 'states' as graphics. I assumed I'd be able to call up a repetition with a script attached to an invisible button, but...

Any help appreciated

allOff.jpg

go.jpg

I a not too certain what your trying to accomplish.

but you can reference in the repetition by using field[Number]

or ContainerField[YourStatusField] this will evaluate to the corresponding image based upon your status field.

you may consider this too...

http://www.filemakermagazine.com/videos/using-global-graphic-variables.html

I like this a lot, John! :wink2:

Also, I know you know this but others might not, instead of attaching the script to the webdings directly, you can place a circle (using the circle tool) over the buttons. Leave the pattern solid so it's easy to place perfectly. Attach the script to it then turn the circle to transparent. It produces a beautiful round button click instead of the standard rectangle (see attached). The effect, test it by holding the button down, is quite pretty!

I'm with you - using webdings ROCKS!

Hey Stephen, that technique is very valuable! Thank you for pointing it out to us. At one time, I considered if it were possible to store a graphic within a variable like we can store a graphic within a script parameter but I dismissed variables without testing. Very cool!

UPDATE: Actually, John did such a great job of matching the original graphic that I didn't see that the circles were his! So you could just attach the script to those circles directly! Wow, John, you are great with graphics - wanna come to work for us? Nah, we couldn't afford you! :laugh2:

playerMOD.zip

Edited by Guest

Also, I know you know this but others might not, instead of attaching the script to the webdings directly, you can place a circle (using the circle tool) over the buttons. Leave the pattern solid so it's easy to place perfectly. Attach the script to it then turn the circle to transparent. It produces a beautiful round button click instead of the standard rectangle (see attached). The effect, test it by holding the button down, is quite pretty!

I got lazy. :)

player_notlazy.zip

Edited by Guest
added file

A little more care is required when aligning the objects (see the Mac screenshot).

I wonder how this version looks on Windows.

Align.jpg

playerAligned.fp7.zip

It looks like this under Windows.

player.jpg

Yes, Mac and Windows never line up the fonts. Many times, Michael, the great demos you produce using webdings show them off center as well. Even regular fonts, when viewed on Mac look fine, aren't on Windows - the text boxes are too small and part of the text is cut off the bottom. It is pib when dealing with cross platform issues like this.

Yep, your new version is perfect, John - on Windows at least!

Edited by Guest

At one time, I considered if it were possible to store a graphic within a variable [color:green]like we can store a graphic within a script parameter ...

Please, LaRetta, can you explain how ?

Where is the problem?

There's no problem...

Only I don't know how to store a graphic into a script parameter... didn't it store only text ?

It says it should be text, but this works:

Perform Script [ “Your Script”; Parameter: YourTable::Containerfield ]

Thank you.

Yes, at least on Windows, the picture is as clear as the original. It can save using the clipboard if you want to move something and don't have a relationship (as kittens attached).

kittens.zip

  • Author

Thanks everyone for the insight, but it's obvious I don't know enough about variables or globals etc. so I have to go back to school... I see what you've achieved, but don't understand how it's working.

I do appreciate the help, though :)-)

You were offered many methods. Would you like to tell us which you'd like to use and ask to have it explained in an easy manner? If not, that's okay too. But not understanding is acceptable. And so is asking how something is done. :smile2:

You are using FileMaker 9, so the conditional formatting feature has been used. A script parameter is passed and then a global variable is set based on it.

See if this gets you started. If not, then come back and post specific questions and we'll see if we can help ya further.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.