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.

Calculation based on Text Color

Featured Replies

How would i go about creating a calculation that is based on the Text Color.

So for example, if a field text color was black, then the value is gained, but if the field value is red, then the value is left empty.

I thought of using CF, and setting any red text to white to make it invisible, but i actually need an empty value instead of an unseen value.

I have tried several different calculations, what i though might give me the result, but i have yet to get the correct calculation.

What determines whether the field colour is black or red?

If I'm understanding you correctly, you might find these two Custom Functions helpful.

GetRGB

GetTextColor

Lee

  • Author

What determines whether the field colour is black or red?

The text color is determined by a Conditional Format.

So basically i want to duplicate the value of the field, with CF, but only have the Black text value, and where there is a Red text value, it is not displayed.

Edited by Guest

You should be looking at the original conditions (the ones that determine what color the text should be), instead of at the result of conditional formatting.

  • Author

The conditional Formatting is set by:

Table1::Field1=Table2::Field1 and Table1::Field2=Table3::Field1

and changes the text to red if it is TRUE.

If the above is not TRUE, then the text remains as black.

I do not want to delete the red text, but simply display it as highlighted instead.

I was trying to use a separate field to show the values, of only the black text. This way i could have the red text deleted, and still have a copy of it in the original field.

That's a bit abstract description, but I think a calculation field =

Case ( Table1::Field1 ≠ Table2::Field1 or Table1::Field2 ≠ Table3::Field1 ; YourTextField )

should work.

  • Author

If I'm understanding you correctly, you might find these two Custom Functions helpful.

GetRGB

GetTextColor

Lee

Thanks for the reply Lee.

The GetTextColor seems to work to gain a numerical value for the text color if i manually change the text color, but as it is changed via CF, the calculation does not work for some reason.

  • Author

Maybe i should have a re-think of the scenario of how i CF the text.

To put my project in the correct light of understanding i could explain it like this:

Table1 is a list of Product Categories and Product Numbers

eg.

Cat-1000 - Part No. 12345

Cat-1001 - Part No. 12346

Cat-1001 - Part No. 15555

Cat-1002 - Part No. 12347

Table2 is a list of selected part numbers supplied.

Customer1 - Cat-1001 - Part 12346

" " - Cat-1002 - Part 12347

If that scenario occurs, the data in Table1, needs to then have the selected Part Numbers, NOT available to be selected again.

Thus my reasoning for trying to populate a field with ONLY black text color values, and not show the red text color values.

If that scenario occurs, the data in Table1, needs to then have the selected Part Numbers, NOT available to be selected again.

Not available to be selected again: in the same order? for the same customer? never?

Some more background about what your solution does would be useful. I don't quite see how conditional formatting and/or a field that is conditionally blank come into this.

  • Author

I want to be able to visually see what parts had been used(currently Red) for future reference.

But that particular part will never again be available to be used in Table2.

If it was simply deleted from table1, then i would have no record of what parts were originally available.

I am still mostly guessing here as to your structure.

Speaking generally, if a product can be sold only once, then there is no need for a LineItems table: the relationship between Invoices and Products is one-to-many, and a sale is best recorded by entering the InvoiceID directly into a InvoiceID field in the Products table. Thus a product is available only when that field is empty.

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.