Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5212 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

Posted

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.

Posted

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.

  • Newbies
Posted (edited)

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 by Guest
  • Newbies
Posted (edited)

Thanks Vaughan. Just tried the the Case function, didn't work unfortunately.

Cheers.

Sui

Edited by Guest

This topic is 5212 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.