Jump 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.

Changing the text color from within a script.

Featured Replies

Our custom picture department uses different colors for the slide number depending on location of slides.

How I was going to do it was create a field called "itemcolor" and give it a value of 1 to 4, we use 4 colors.

Then I was going to create three more fields called "Slide_green, Slide_blue, Slide_Red" (Slide_num is there already they change the color by hand)and these would be set to that color in the layout. They would be calculations (ie Slide_Green would be (IF itemcolor = 1,slide_num,"") ect..

And place them on top of each other. This is a lot of work because they show up in many layouts.

I really would like to change the text attributes within the field by pressing a button while in that record. Otherwise I will have to make that change to every layout with this field?

Any other solutions/comments would be appreciated.

crazy.gif" border="0

Your only other option is to copy and paste preformatted text into the field. You could enter number into the field and click a button. The script could test Status(CurrentLayout) and the number entered and go to a library of preformatted colored numbers and assemble a slide number of the correct color in the field. Personally, I'd create a field stack, group it, and copy and paste it to all the layouts. Unless you've got hundreds of layouts, this might be the way to go.

-bd

  • Author

I was afraid of that. I only have about 15-20 of them to do, I guess that isn't so bad. Thanx for the input.

I noticed the post looking for an AppleScript method of changing properties. I think you will find that from a speed and stability standpoint just doing it in FM is the way to go. Also if you ever change or add a platform, you will have to redo the solution with yet another system scripting language. With 20 layouts you will spend longer looking for another solution than just making the changes.

-bd

  • 2 weeks later...
  • Author

I did find a workaround. Since the slide department only uses Mac's for Filemaker, I decided to use an applescript in conjuction with Style (Similiar to SimpleText but it is scriptable). I have a combination of Filemaker scripts and Applescript which copies the entire field to the clipboard and then places that sentence into Style, changes the color copies it back to the clipboard and then replaces the text in the field with the colorized text. It works great. The Art department now can just click a button to change the status of the slide instead of having to maneuver around the text attributes menus to do this.

Thanx for all the input.

Thomas Lepkowski

Create an account or sign in to comment

Important Information

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

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.