Philip Jenks Posted September 21, 2004 Posted September 21, 2004 Hi I have a database of 10,000 records. One of the fields is 'Profession', validated against a Value List of 30 professions. I want to create a field which automatically counts up how many records there are for each profession, and displays the number on each record. So it would show Joe Bloggs as Surveyor and then say '40' if there were 39 other surveyors. I'm a beginner at this, but should I be setting up a calculation field which uses the Count function, and if so, can anyone advise how I should define it, assuming the Profession field is called 'Profession'. Thanks. Philip
-Queue- Posted September 21, 2004 Posted September 21, 2004 Create a self-relationship from Profession to Profession. Then a calculation of Count(relationship::id) will give it to you.
Philip Jenks Posted September 22, 2004 Author Posted September 22, 2004 Hi Queue Thanks for the advice. I've created the self-relationship, and created a new calculation field, but I'm not sure what the (relationshiop::id) is. If I haven;t exhausted your patience, can you explain? Thanks. Philip
FMFan Posted September 22, 2004 Posted September 22, 2004 I am trying to write a script to find out whether a radio button is selected or not ex. If (radio button names=1) then ........ Is this right? I mean, what does the radio button return as a value?
-Queue- Posted September 22, 2004 Posted September 22, 2004 Philip, relationship::id translates to the related id or serial number field (unique identifier) based on the self-relationship we've just created. When you create the calculation, enter Count(, then select the self-relationship from the menu above the field list, and the serial number field from the resulting list. Then enter the closing parenthesis. FMFan, formatting a field as a radio button or checkbox is merely a visual aide. It doesn't change the content of the field. If you have field with "yes" and "no" radio buttons, the field contains either yes or no. So a test for the value would be If [field = "yes"] or If [field = "no"]. If you are using checkboxes or expecting that more than one radio button option will be selected, use If [PatternCount( field, "yes" )], et al.
FMFan Posted September 22, 2004 Posted September 22, 2004 Did not work Queue. Actually, I have a checkbox that is either selected or not selected. I want to be able to determine whether the checkbox is selected or not by writing a script that says if check then do this else do this. Any suggestions?
-Queue- Posted September 22, 2004 Posted September 22, 2004 What is the value for your checkbox? Use that in place of the "yes" or "no" examples above.
FMFan Posted September 22, 2004 Posted September 22, 2004 Do you mean the "specify field"? Well that's equal to "number". So I would say, if "table1::new="number"" then omit record? But that does not seem to work.
-Queue- Posted September 22, 2004 Posted September 22, 2004 If [table1::new = "number"] Omit Record End If should work. Could you elaborate a little on your goal? That might help.
FMFan Posted September 22, 2004 Posted September 22, 2004 Queue. Somehow its not reading the radio button. I just want to read the radio button. If Radio button is "X" then omit that record. That's it.
-Queue- Posted September 22, 2004 Posted September 22, 2004 If table1::new is your field formatted as a radio button and "X" is the option for the field's value list, then If [table1::new = "X"] should work just fine. Put the field on your layout again, but leave it formatted as an edit box. If "X" is what you see in the field, then it is equal to "X".
MoonShadow Posted September 23, 2004 Posted September 23, 2004 Hey Queue, you're getting your workout today!! FMfan, do you have a radio button or checkbox - you've contradicted yourself here and it makes a difference. The 'X' in a checkbox is just FMs way of tell you it's selected - same with the dot in a radio button. That is NOT what is actually inserted into the field. You need to identify the field contents. whether a radio button is selected or not Regardless whether radio or checkbox however, if all you want to know is whether that field has been selected at all, just use IsEmpty() for your test. If [not IsEmpty(Table1::New)] ... do this, else do this. As Queue indicated, you need to 1) Look at your Value List and determine what the 'clicked' value will enter. 2) Place your field as 'edit box' field on your layout and make it about 3 rows high to see what all it contains. Why 3 rows? Because sometimes by accident it can contain more than one line and 3) be a bit more precise in your descriptions so we can assist you better. It's just like talking to a physician. Telling him 'it hurts' doesn't give him enough to diagnose properly. If you want accurate assistance, you need to provide accurate answers. We all want to help you. So help us do that, okay? If you only want to know if your radio or checkbox is selected, the above calculation should work for you. If you want to Omit only if the contents equals something specific, then you need to identify your field contents. It also appears that the field contents come from a related file/table? If so, it will only display the first matching record from the relationship if it's a regular field on your layout. You may have something else wonky. But I would bet you have a number in that 'checkbox' a one (1). And your Value List only has a 1 in it (if that field is number). That's usually how using a checkbox toggle works.
FMFan Posted September 23, 2004 Posted September 23, 2004 Does anyone know how to do a hover feature over a button to make the text change color when the mouse is over it?
FMFan Posted September 23, 2004 Posted September 23, 2004 Thanks Moon Shadow. I will try that and get back to you.
Lee Smith Posted September 23, 2004 Posted September 23, 2004 Hi FMFan, Check this Thread. Click Here! Lee
FMFan Posted September 23, 2004 Posted September 23, 2004 I am displaying data in a portal and the fields keep showing up for each record. I want the field to show up once per each category. Any solutions?
Ocean West Posted September 23, 2004 Posted September 23, 2004 Yes via a plugin... http://24usoftware.com/SimpleHelp
-Queue- Posted September 23, 2004 Posted September 23, 2004 No. Mouseovers are not supported as of yet.
Recommended Posts
This topic is 7712 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