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.

Change Font Formatting with click

Featured Replies

Hi

I have a field named "LANE" and I want text to go in it in a certain format I can certainly do that.

But is there any way- when the user clicks on the field by making the field into a button to change the color of the text ----

and if the user clicks back again

it changes back to the original text color.

So with each click It might go from Click =RED to

Click again while it is red and change to GREEN

and then next click would bring the text back to red and the next click after that would bring it back to green. etc

Is there anyway to do this?

Thanks for your answers and thought process .............

Stann

  • Author

I am talking about toggling the font color with each click. Is there any answer to this

Thanks

Stann

Hi Stann, i don't use v7 but i think your strategy here would be to make that button tied to a script that changes the values of three fields: R-Value, G-Value, and B-Value. The script could be something like (in pseudocode):


If R-Value = 0

  Change R-Value to 255

Else

  Change R-Value to 0

End

If-G-Value = 0

  Change G-Value to 255

Else

  Change G-Value to 0

End

Then make the color for your desired field dependent on those three fields.

HTH.

J

  • Author

Thank you for the answer.

I have been trying to get it to toggle but it doesn't seem to be working with my version of filemaker.

Does anyone know how to accurately change font color with Filemaker 7? Thanks very very much,

Stann

Create a number field called "color flag", then the following script will work.

Script: Text Color

If [ Table::color flag = 1 ]

Set Field [ Table::Field; TextColor (Table::Field ; RGB ( 255 ;0 ;0 ) ) ]

Set Field [ Table::color flag; 0 ]

Else

Set Field [ Table::Field; TextColor ( Table::Field ; RGB (0 ;255 ; 0 ) ) ]

Set Field [ Table::color flag; 1 ]

End If

Commit Records/Requests[ Skip data entry validation; No dialog ]

  • Author

This doesn't seem to work for me - do you have a sample file of this by any chance?

That would help

I am frustrated, cause I can't seem to get it to work

Thanks

Stann

A sample is attached. Click on the field label to toggle between red and green.

color_change_sample.zip

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.