Corey-Troy Posted February 22, 2010 Posted February 22, 2010 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.
efen Posted February 22, 2010 Posted February 22, 2010 What determines whether the field colour is black or red?
Lee Smith Posted February 22, 2010 Posted February 22, 2010 If I'm understanding you correctly, you might find these two Custom Functions helpful. GetRGB GetTextColor Lee
Corey-Troy Posted February 22, 2010 Author Posted February 22, 2010 (edited) 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 February 22, 2010 by Guest
comment Posted February 22, 2010 Posted February 22, 2010 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.
Corey-Troy Posted February 22, 2010 Author Posted February 22, 2010 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.
comment Posted February 22, 2010 Posted February 22, 2010 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.
Corey-Troy Posted February 22, 2010 Author Posted February 22, 2010 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.
Corey-Troy Posted February 22, 2010 Author Posted February 22, 2010 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.
comment Posted February 22, 2010 Posted February 22, 2010 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.
Corey-Troy Posted February 22, 2010 Author Posted February 22, 2010 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.
comment Posted February 22, 2010 Posted February 22, 2010 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.
Recommended Posts
This topic is 5446 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now