torifile Posted December 7, 2004 Posted December 7, 2004 I did a search and nothing relevant came up. Please pardon the question if it's been answered.... I've designed a database to track therapist sessions. I've got that much worked out. Every other session needs to get a particular set of questionnaires filled out. The other half of the sessions need to get a different set filled out. Right now, what I'm doing is listing all the questionnaires for each session (basic, "yes no" radio button set). I'd prefer that in the portal row listing each session, the appropriate questionnaires be listed rather than all of them. My table design is like this: Therapist table Therapist ID (primary key) blah blah. Appointment table therapist foreign key appointment primary key date of session dq (questionnaire 1) bsl (questionnaire 2) psq (questionnaire 3) blah blah... Questionnaires 1 and 2 are given after the odd numbered sessions and 2 and 3 are given after the even numbered ones. Again, all I need is a radio button set to show up with the appropriate label/mapped to the correct field in "appointment table". The appointment table is presented as a portal on a layout with "therapist table" as the current table. Also, how do I number my portal rows? Any ideas? TIA.
transpower Posted December 7, 2004 Posted December 7, 2004 You could use the Mod function in a calculation field to automatically set the appropriate questionnaire. Define a summary field (say countAppoint) to count the number of appointments. Then Questionnaire = If ( ( Mod(countAppoint ; 2 ) <> 0 ; Q12 ; Q23 )
torifile Posted December 7, 2004 Author Posted December 7, 2004 I guess I should say I'm a newbie and would really appreciate a walk-through of the steps involved in doing this. Like where do I create the calculation field? Does it go in a table or a script? I'm still trying to grok all the parts of FMP and where stuff goes. Thanks.
transpower Posted December 8, 2004 Posted December 8, 2004 Oh. Actually, this would be a regular text field with auto-enter calculation, not a calculation field per se (because it would just be a one-time calculation for that appointment). So, it's a function, not a script. The field would be added to your appointment table, and could be seen in the therapist layout portal. You choose auto-enter by File | Define Database | add the new field | options | Auto-Enter | Calculated value | put the formula there Of course you will also need to define the countAppoint field; this will be a summary field based on count.
Recommended Posts
This topic is 7359 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