October 13, 201015 yr Newbies Please could someone help? I have spent a couple of hours trying to figure this out but to no avail... I have a collected data using a questionnaire, and would like to enter it onto a database. Each question has four options, with each scoring a number of points, e.g.: Q1 (How happy are you?) A: (choosing one of the following four options) i am always happy = 1 i am usually happy = 2 i am usually unhapppy = 3 i have lost the will to live = 4 I have formatted the field, so that the four options appear as "radio buttons". My question, please: How do I create an automated field, so that if the first option is chosen ("i am always happy"), the number "1" automatically appears, in another field which I shall call "scoreQ1"; if the second option is chosen ("i am usually happy"), the number "2" automaticlaly appears, and so on and so forth. I have done this (via Define-> Database -> Specificy Calculation): In the Specify Calculation dialog, I have used "If" function, e.g. scoreQ1 = If (Q1 = "i am always happy"; 1; 0) + If (Q1 = "i am usually happy"; 2; 0) + If (Q1 = "I am usually unhappy"; 3; 0) + If (Q1 = "i have lost the will to live"; 4; 0) I have also tried "and" instead of "+", and "or" instead of "+". I have also triple (!) checked that the spelling/spaces/wording within the " " are correct. I have also double checked that I have chosen 'Calculation' for Field Type, and 'Number' for Calculation Result. However, nothing seems to work! Have I misunderstood some fundamental principle of Filemaker? I've read the tutorial and User's Guide a few times now, and used the Help function, but can't get it. I use Filemaker Pro 7. Thanks in advance. Sui
October 13, 201015 yr Case( Q1 = "i am always happy"; 1 ; Q1 = "i am usually happy"; 2 ; Q1 = "I am usually unhappy"; 3 ; Q1 = "i have lost the will to live"; 4 ; "" ) This answers your question, but it may not solve your problem. Please do yourself a favour and get off FMP 7. FMP 8.5 is now available very cheaply because it cannot be upgraded any more. FMP 8.5 is a much better version than FMP 7. FMP 9 is better again.
October 13, 201015 yr Have I misunderstood some fundamental principle of Filemaker? IMHO, yes - but not at the point you ask about. These options should be in a table of their own, with a field for Score. This way when one selects an option, the score is retrieved (or looked up) from the related record in the Options table - and no calculation is necessary.
October 14, 201015 yr Author Newbies Thanks both, for reply. This is my first opportunity to go online since posting my query. I shall try the table suggestion now. Cheers. Sui Edited October 14, 201015 yr by Guest
October 14, 201015 yr Author Newbies Thanks Vaughan. Just tried the the Case function, didn't work unfortunately. Cheers. Sui Edited October 14, 201015 yr by Guest
Create an account or sign in to comment