Mark L Posted April 4, 2005 Posted April 4, 2005 Somehow I believe this will be a "no-brainer" for an experienced FMP person: I have a file of medical staff in my application - it has fields like Staff Member Name. Staff members also have a Type field - which can be P for Practitioner (ie. Doctor,) R for Registered Nurse, T for Technician and A for Administrative. I'd like to use the Staff List as a drop down list to get Practitioner Name on the Patient record. Right now all staff members show in my drop down - but I only want the "P" records to show on the list. What's the best way to achieve this? Much thanks in advance, Mark PS - I'm using FMP 7 Developer
RalphL Posted April 4, 2005 Posted April 4, 2005 Make a relationship based on type and use this to form your value list.
Mark L Posted April 4, 2005 Author Posted April 4, 2005 Ralph- Thanks for the quick reply as usual. So I've created another occurance of my Staff file called StaffX and made the two link on Type - but where do I introduce my "P" criteria to filter out the non-"P" staff members? Thanks, Mark
RalphL Posted April 4, 2005 Posted April 4, 2005 You will need to add a field, either a global or a calculated field = "P". Use this field in the relationship on the Staff side and Type on the StaffX side. Sorry, I wasn't clear on that.
Mark L Posted April 4, 2005 Author Posted April 4, 2005 Ralph- Believe it or not - I'm still having trouble making this work. There are two problems as best as my small brain can figure: 1) I created a gType - a Global Text field that is calculated simply as "P" (with the quotes.) My calculation doesn't seem to take. I've tested by putting the gType field on my Staff layout - and it remains blank. I've confirmed that unchecked is "Do not evaluate.." in the calculations area and "Do not replace existing value for field" on the Auto-Enter tab. 2) To work around the problem above - I used the field gType on the Staff layout to simple type in "P" - so then it takes - and on every Staff record I see it as you would expect. But my value list still doesn't seem to filter only the "P" records. Also I've confirmed that Staff::gType = StaffX::Type and that my Value List is based on StaffX and not on Staff. Can anyone see what I'm doing wrong? This seems so simple, there must be simple thing I'm missing. HELP!
RalphL Posted April 4, 2005 Posted April 4, 2005 Have you checked the Include only related values? And selected the starting table?
Mark L Posted April 4, 2005 Author Posted April 4, 2005 Hey I figured out problem #2 by myself- I didn't have the following checked in "Specify Fields in Values List" section: The radio button needed to move from "Include all values" to "Only Include related values starting from" then I needed to select my original Staff table from the drop down there. Now I only see "P" records. Thanks again Ralph L for setting me in the right direction. Now if I can only figure out problem #1. I created a test file - and can't reproduce the problem myself. If anyone still has some thoughts why my global calculation won
Mark L Posted April 4, 2005 Author Posted April 4, 2005 Woops - looks like our postings just crossed - and I was so proud of myself. Thanks again Ralph.
RalphL Posted April 4, 2005 Posted April 4, 2005 The calculation was not intended to be a global. You might want to set the global field with your opening script. Gald you got it working.
LaRetta Posted April 5, 2005 Posted April 5, 2005 Hi Mark ... your Question #1 ... 1) I created a gType - a Global Text field that is calculated simply as "P" (with the quotes.) My calculation doesn't seem to take. I've tested by putting the gType field on my Staff layout - and it remains blank. I've confirmed that unchecked is "Do not evaluate.." in the calculations area and "Do not replace existing value for field" on the Auto-Enter tab. And it won't fill in until you create a new record (Auto-Enter works that way). Once a new record is created, it applies to all records but Auto-Enter stipulates a new record creation to activate it. But ... if you use a calculation (whose calculation result is set to text and storage set to global), it won't matter if you ever create a new record. Your one "P" value will show for all records. LaRetta
Recommended Posts
This topic is 7177 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