April 4, 200520 yr 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
April 4, 200520 yr Author 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
April 4, 200520 yr 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.
April 4, 200520 yr Author 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!
April 4, 200520 yr Have you checked the Include only related values? And selected the starting table?
April 4, 200520 yr Author 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
April 4, 200520 yr Author Woops - looks like our postings just crossed - and I was so proud of myself. Thanks again Ralph.
April 4, 200520 yr 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.
April 5, 200520 yr 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
Create an account or sign in to comment