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.

Contextural Format: TextColor

Featured Replies

Hi Everyone,

I've got 2 fields - the first (CARD) i want to be coloured depending on the date of the other (DATE). I sorted it out, making the first field Card a calculation - but then i found the problem that i'm stuggling with ... i can't then entere info into it.

The calculation is:

CARD=

Case ( DATE ≥ (Get ( CurrentDate )-180) ; TextColor (CARD ; RGB (255;0;0)) ;

DATE ≥ (Get ( CurrentDate )-365) ; TextColor (CARD ; RGB (255;150;0)) ;

DATE ≥ (Get ( CurrentDate )-545) ; TextColor (CARD ; RGB (0;255;0)) ;

TextColor (CARD ; RGB (0;0;0)) )

I thought i'd got round that by making CARD a text field, and having the calculation in define field>auto-enter> specify, which allows the entry, but doesn't do the formatting!

How can i enter into the field, and have it change it's format depending on another field? (I would be using this method on quite a number of different fields, and because of the layout i don't want to introduce other fields.)

Thanks very, very much for any info!

Cheers,

slater

  • Author

Hi,

I guess that because no one's replied, i'm trying to do something that i can't do!! (please correct me if wrong.)

The best solutiont i can come up with is adding another field, and make it run the text colour calculation:

Case (

Seen_Date ≥ (Get ( CurrentDate )-180) ; TextColor ("n" ; RGB (255;0;0)) ;

etc)

then setting the text to webdings - and the result is a coloured dot that i can place alongside the text field that i want to change colour - not as pretty a solution as i'd hoped, but most importantly i can now enter stuff into the text field.

I had been thinking of trying to make this field sit behind the text field that i want to enter stuff into, but that seems too much grief!

Cheers,

slater

ps, couldn't find anything on the boards that sounded promissing except a couple of dead links

First, your calculation can be simplified to:

TextColor ( CARD ;

Case (

DATE ≥ Get ( CurrentDate ) - 365 ; RGB ( 255 ; 0 ; 0 ) ;

DATE ≥ Get ( CurrentDate ) - 545 ; RGB ( 0 ; 255 ; 0 ) ;

0 )

)

Second, this will work if CARD is a text field, auto-entering the formula, and 'Do not replace existing value...' is NOT selected.

  • Author

Hi Comment,

Thanks for helping me out - the forumlar looks cool, and i'll have a go at the suggestion for the CARD field.

Cheers,

slater

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.