Set text colour by value in field

  • Permalink
  • submit to reddit
  • Email
  • Follow


I've been away for sometime so greetings to all at the best FM group on the
net. I've got a field containing numerical values ranging from -3 to +3 and
a want to set the text colour according to these values - red for -3 ranging
through to green for +3. Is there any way of achieving this. I run a script
to sort them by the value in this field so I can attach further lines to
this script or run a sub-script. All advice appreciated.

Regards, David



0
Reply David 2/29/2004 11:39:12 AM

See related articles to this posting


It is said that what you describe will be scriptable in FileMaker 7 later
this year. At present, it is a bit more complicated (without knowing what
the scripting will look like).

You have your field Value.

Define several calculation fields:

ValueMinus = If (Value < 0, Value, "")
ValueZero = If (Value = 0, Value, "")
ValuePlus = If (Value > 0, Value, "")

Place the three fields on your layout, identical in all formatting except
color, with transparent fill. Set each to the color of your choice (e.g.,
red for ValueMinus, black for ValueZero, green for ValuePlus. Align them on
top of each other and group them for easy positioning.

This method is obviously best suited for display (the Value field need not
even be on this layout). If you really want this to be the input layout as
well, put Value (again, identically formatted) behind the other three, and
use tabbing or a Go To Field step in a script to get into it for entry.

If you didn't want the three calculation fields, you could make them glabals
and, but you would have to use scripting to set and reset each according to
Value.

Matt




in article 4ck0c.7081$RB.4587@newsfe2-gui.server.ntli.net, David Price at
brynymor@ntlworld.com wrote on 2/29/04 6:39 AM:

> I've been away for sometime so greetings to all at the best FM group on the
> net. I've got a field containing numerical values ranging from -3 to +3 and
> a want to set the text colour according to these values - red for -3 ranging
> through to green for +3. Is there any way of achieving this. I run a script
> to sort them by the value in this field so I can attach further lines to
> this script or run a sub-script. All advice appreciated.
> 
> Regards, David
> 
> 
> 

0
Reply Matt 2/29/2004 12:43:34 PM

Matt Wills <I'm@witz.end> wrote in message news:<BC6748A3.20C%I'm@witz.end>...

> Place the three fields on your layout, identical in all formatting except
> color, with transparent fill. Set each to the color of your choice (e.g.,
> red for ValueMinus, black for ValueZero, green for ValuePlus. Align them on
> top of each other and group them for easy positioning.

I tend to use a coherent string of 3 mergefields instead of the
layering approach Matt suggests, a trick to remember is just the first
"<" needs to carry each formatting.

Another issue is that if you're to show values that somehow have lost
their ability to be stored, say a portal line figure showing a pull of
a certain item deducted via a relation, could such freshing of
unstored values make a invoice/contract tiresom to watch building up.
Some kind of relookup mechanism could be instated by the entry of the
pull value ...bearing in mind that the colour shown is then FIFO...

--sd
0
Reply sdyhr 2/29/2004 8:58:04 PM
comp.databases.filemaker 10774 articles. 18 followers. Post

2 Replies
356 Views

Similar Articles

[PageSpeed] 57


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

Setting a text field's value from a href
I have a text field and a href. When the user click on the link I want to set the text field to a value. I'm trying to do it with jQuery, but I can't get it to work. I have this: <A href="javascript: $('filterValue').val('POR');">POR</A> How can I accomplish this? And before 100 people tell me that is not the proper way to use a link, please don't. I know this, but I have a client that wants this. I told them it should be a button, but they want it to be a link, and they are paying. TIA! -larry Le 09/03/12 15:18, Larry.Martell@gmail.com a ...

Set text field to a certain value using a script -FM 8
Hello All, I have a layout which has a text field called "City". I have a hidden field called "Mutiple City". Each time the field contents of City ="new york" I need to set the hidden field to "true". Could you please guide me on how I could do this? Thank you. Deepti In article <0ad8e869-a410-448e-b2f2-5976f062e32c@8g2000hse.googlegroups.com>, Deepti <dpulavarthi@gmail.com> wrote: > Hello All, > > I have a layout which has a text field called "City". I have a hidden > field called "Mutiple City". > ...

FM6: Way to bold and set a colour to selected text in a field's content?
I know my version of FMP is very old, but it's what I have and for the most part is all I need so I can't justify upgrading. But I was wondering if anyone knew how to add attributes to selected text without doing it manuallly all the time. I need to bold certain titles in the text contents of information fields and to set the colour of that title text to one of the shades of blue available. Is there a way to do this, perhaps via a script? I'm not a very advanced FMP developer, so hopefully there's something that is fairly simple to implement, too. Thanks! On 2010-07-18 0...

Access Forms: Set different field background color based on text box value
Hi all, I am trying to set different background color based on text box value on a form. Basically, I have one form that display many lines of records(record source is a query), in each of the lines, if a text box named "status" is "C", THe line will be shown in green, else in red. Can this be done? ANyone can help me with this? Rgds, Vic See: http://www.lebans.com/conditionalformatting.htm -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org....

setting fields based on values of other fields
Ok... here's the scoop... I've got an unbound form with Serial Number, Building, and Room... all this is in tableA... Now I've got the form setup with building, room and serial number as combo fields... I've got it so that when you click the dropdown on Building it queries the table for all buildings, then the one for room queries for all the rooms in the picked building, and the serial number drop down queries on building or building and room... so far so good. I would like to make it so if a serial number is picked from the drop down box before building and room are pic...

Setting Modified By Field with a Global Field Value
Hi I know that we can have the Modified By set by using the Username in the Applications prefs, and have the field set to Auto enter Modified Name when the record is changed, but is it possible to have this set to by a field value? I have a Username field in the DB, set by a Global within my globals file based on their login username and password, which works well, but when a file is modified I want the system to automatically update the modified by field with the value from the Global username field from the globals file. Using FM Dev5.5 on Win XP Thanks Greg Search the archives of this...

Setting field values and locking fields in iText
I'm looking at iText (1.02b) to see if I can use it for taking an existing "open" PDF document, read it in, set one or more field values, "lock" specific fields, and then output the document to a browser. It's the "lock" functionality that I don't see. I can do everything else. I noticed that the Acrobat GUI has the ability to lock fields, but I don't see that in the iText API. David M. Karr wrote: > I'm looking at iText (1.02b) to see if I can use it for taking an > existing "open" PDF document, read it in, set one or more ...

How to set a field value to another filed value
I want to set the field BUDGET_AMOUNT to the value held by a second field AMOUNT_01 or AMOUNT_02, etc but I can't figure out how to do it using parameters. I tried the following: UPDATE MYBUDGET SET BUDGET_AMOUNT=:dBudget'; Leaving alone for the moment thew question of setting up the correct field name, suppose I want to copy the AMOUNT_01 value to the BUDGET_AMOUNT value.I tried setting the dBudget parameter with the following statement: ParamByName('dBudget').AsFloat := FieldByName('AMOUNT_01').AsFloat; I get an error message "..Query1: Field AMOU...

set text box default value to be the current value
I've got a text box on a form where the default value shows - C:/ The user can change the default to whatever they want - D:/ I'd like to put a button next to the field that will change the default from C:/ to D:/ so the next time the form is opened D:/ is showing. Any ideas? Thanks Charlie Hi Charlie Put all your default settings in a table and populate controls with these on loading the form. Your defaults table only needs to be a couple of fields - one for the name of the default and say a text field to carry the default setting. Text field is good cause you can put anythin...

How to modify the view to set one field with min value of its field
Now, after running the orginal view, i will have records with same db_tran_id and those may have different a.ADUIT_DATE. But, I want to make them have the min a.AUDIT_DATE for all records with same_tran_id when select from the view: Anyone can help me for the following Original View ============== CREATE OR REPLACE VIEW VW_RPT_AUDIT_ROOT_SYMBOL (COMM_CODE, USER_ID, AUDIT_DATE, AUDIT_TIME, TYPE, DB_TRAN_ID, TOPIC, TOPIC_KEY, SUBTOPIC, SUBTOPIC_KEY, DESCRIPTION, SEQ_NO, DATA_TYPE, DEFAULT_VALUE, PRECISION, NEW_VALUE, OLD_VALUE) AS select det1.text_1 as business_key, u.user_id, t...

Checking input fields(text) value when field is loosing focus
Hello, I have I simple question that is not clear for me. So, I have a input field (text field) in my html page. User should give input as a string like following 12 345 678,0 If user gives input in format 12345678,0 and leves the input field how can I format the value 12345678,0 into format 12 345 678,0? Are there any Javascript that can handle this with Regular Expressions? Thanks! JohnnyW wrote: > [...] I have a input field (text field) in my html page. > User should give input as a string like following 12 345 678,0 > > If user gives input in format 12345678,0 and lev...

set new field to value in first non-null field
Gang - Can someone help with this seemingly simple task. If we we're dealing with numeric data, the MAX function would be appropriate, but I'm working with character data. Data looks like this: ("V" stands for variable) V1 V2 V3 V4 .. . . x x . . . .. x . . final data set v3 v1 v2 Ultimately, I want to create 1 variable containg the name of the field that had the "x" in it. Mike Thank you Very Much! On Jul 12, 9:04=A0am, Takeadoe <mtonkov...@msn.com> wrote: > Gang - Can someone help with this seemingly simple ta...

radio button make text field equal value of form field
What I am trying to do is when someone clicks on the YES radio button I want the text field called MYTEXT to equal the text field named DATE. The below code works as long as I do NOT UN-COMMENT the NO radio button, once I do that it will not work. Any help would be greatly appreciated. Mitch <body> <script language="JavaScript"><!-- function setField(what) { if (what.myTick.checked) what.myText.value = what.date.value; else what.myText.value = ''; } //--></script> <form> <p> Yes <input name="myTick&quo...

setting text boxes to query return value and query parameter value
Hello, I'd appreciate any help on two issues I'm stuck on, thanks. I have the following query: SELECT Avg(Login.StartTime) AS AvgOfStartTime FROM Login WHERE (((Login.EmployeeID)<>12) AND ((Login.StartDate)>=[Please Enter Avg Start Date] And (Login.StartDate)<=[Please Enter Avg End Date])); 1: I would like to run this query on the click of a button and assign the resulting value(AvgOfStartTime) to a text box on the form. I do not want the query data sheet to show up, just place the value in the text box and that's it. 2: I'd like to take the date parameter(eithe...

A97 table field of Yes/No type without a default value property setting has a default value?
I have an A97 table with a Yes/No field named TowJob and a form bound to that table. The TowJob control on the form is bound to the same field. It is an option group with Yes and No bttns valued at -1 and 0 respectively. Unless I specifically set the table field's defaultvalue to Null, the form comes up with an automatic value of 0 in the control? The control has NO default value property setting. Why is that? Why must one EXPLICITYLY set a table field's defaultvalue property to Null instead of simply entering nothing at all into the defaultvalue property setting field? MLH wrote: ...

FCKEditor text field value
I am using fckEditor. I want to get the length of value of the fckeditor text field. Can any1 help me how can i get it through javascript. since when i use alert(texteditorField.value ) it shows nothing. ....how about trying alert(document.form.texteditorField.value) also...watch your spelling...it's case sensitive ...

Setting a value to a hidden field
I have a 2 checkboxes and a hidden field..what I want to happen is that you can only click on 1 of these checkboxes at a time and when you check a checkbox it will assign the hidden field "txtreferral" a value and when you uncheck the checkbox it will set the hidden field value back to nothing ..I have the clicking on 1 check box at a time down but when I try to add the code to assign the value to the hidden field I get an error in the javascript console..heres my code so far: The two checkboxes are named txtreferral1 and txtreferral2 here is the code for txtreferral2.... onclick=&...

Sets and Enum field values
If I had a MySql table field-type: set, with defined legal values 'a', 'c', 'd','e' then updated the table defined legal values to 'a', 'b', 'c', 'f' would the results for any existing row/columns be toasted? For example a row/column for the field contains 'c','e' prior to the table legal values being changed. What would the result be on a select * for the row/column after the defined legal values were changed as shown above? totalstranger nous disait : > If I had a MySql table field-type: set, with defi...

how to change the value of a text field?
my program goes like this. i have a text field named "server" and a dropdown list named "serverselection". everytime when the user make a selection on the dropdown list, the program will exe a function. in this function, a will append the value of the selection to the initial value of the textfield and assign the new value to the textfield. my program aim to allow the user to perform the dropdown list several times. thus the value of the textfield will grow. Please advise mi on how to do this. <% .. .. .. response.write "<tr>" response.write "&l...

Set value in related field
Here comes another novice question, I'm afraid, but I've been banging my head against the monitor to try and make this work for ages. I have two tables, one for customers and one for contacts. Customers table includes: cuscode CusContact and many other things. Contacts table includes: ConCode name address etc. I have a relationship called "Contact Details) set up where customers::cuscontact = contacts:concode I want to run a script in the customers table which will find the related contact (using ...

Hyperlink to Text Field Values
Hi, Is it possible to "call a program" based on mouse click in a particular value in a field. For Eg: I am storing the actor's names in a single field for a movie title. When displaying this movie details as follows Actors : Arnold,Van Damme,Bruce Willis. When clicking on "Arnold", another program(Page in web application)to be opened which lists the movies in which Mr.Arnold has acted. Please note all the names are stored in a single field with comma seperation. Please Help Regards JAIN you can try using the EVENT:SELECTED event: myField STRING('Arnold,Van D...

Multiple Values in Text Field
Hey everyone. Hope you can help me out with this. I have a simple filemaker database set up with a text field named 'year'. In this field I have written in the year that each member has paid their dues. For example person A might have '2004, 2005' and person B might have '2005, 2006'. Now when I do a search in the 'year' field for '2006' ill get a list with person B and that list will include in the field '2005' also. So first off is having a text field with multiple years the right way to go? And second, if I keep that is there anyway to just ...

store the value of a text field
Hi, it's a long time since I don't use perl-tk, so I don't know where to start from to solve this little problem .... Which is the sintax for a text field that contains only two caracters (for example), and how can I store the value in a variable? thanks in advance account@account.com says in article <BBjMa.1616$xK6.35006@news1.tin.it>: > Hi, it's a long time since I don't use perl-tk, so I don't know where to > start from to solve this little problem .... > Which is the sintax for a text field that contains only two caracters (for > ex...

setting the value of checkbox field
Hi, I have a CheckBox field in Uniface .whose value comes from a database field while loading the form i want it to be checked but for display purpose only , In the sense I dont want $fieldmod to be set when you do fieldname.entity="y" something like that to check the checkbox item Or is there anyway I can reset the $fieldmod so that I dont get a message saying field got modified when I exit the form without saving Appreciate anyhelp --0__=CDBBE474DFB1BCB88f9e8a93df938690918cCDBBE474DFB1BCB8 Content-type: multipart/alternative; Boundary="1__=CDBBE474DFB1BCB...