tolga Posted January 8, 2010 Posted January 8, 2010 Hi, I finished my medical database, but need some small adjustments. First of all how can I make a list of patients in a selected month. For example: Selecting list button will show a custom dialog "chose year and month" then the list of patients will be shown whom were operated in that selected month.
bcooney Posted January 8, 2010 Posted January 8, 2010 Hi Tolga, What is the table that you to store patient operation records? That would be the table in which you'd do a Find. You really don't need to build a dialog with select year and month. That is more slick, but a simple Find layout will allow perhaps even more search criteria to be entered (Year, Month, Operation Type, Age, etc.). If you go the dialog route, I'd create a layout with two globals that each have value lists. gYear and gMonth (appropriate value lists). The layout would have two buttons, "Show Patients" and "Cancel". "Show Patients" would run a script that Finds in the table that stores the records, using the Enter Find Mode, 2 Set Fields using the globals, Perform Find construct. If no records are found, the user is returned to their starting layout.
comment Posted January 8, 2010 Posted January 8, 2010 2 Set Fields ?? http://www.fmforums.com/forum/showtopic.php?tid/212795/
bcooney Posted January 8, 2010 Posted January 8, 2010 Good catch, Michael. Thanks. I need to slow down on these "quick" answers.
tolga Posted January 16, 2010 Author Posted January 16, 2010 I couldn't manage to make that script. I think it' s too compicated for a amateur like me. Can you post an example please. I desined something like this: -make a "monhly operation list" button. -this button will navigate a layout containing two (popup) fields. Select "month" and select "year". And a "list" button to perform script. -the scipt will sort the operations in that selected monht in list view. Waiting for your help at this momnet.. Than you
bcooney Posted January 16, 2010 Posted January 16, 2010 Have you looked at the link comment posted? It has the script/design that you need.
tolga Posted January 16, 2010 Author Posted January 16, 2010 (edited) Yes, I' ve looked at it but couldn' understand it. [color:blue]Set Field [ Projects::Date ; Date ( Projects::gMonth ; 1 ; Projects::gYear ) & ".." & Date ( Projects::gMonth +1 ; 0 ; Projects::gYear ) ] Perform Find [] -For example I didn' t understand ".." does it mean to write for the other 11 months? -also confused about gMonth and gYear. do they represent the two new fields of month and year? Edited January 16, 2010 by Guest
bcooney Posted January 16, 2010 Posted January 16, 2010 gMonth and gYear are two global fields that you'll put on a layout that serves as an input dialog. The user will enter values in these fields (each will have a value list attached), and click a find button. The script takes the values in gMonth and gYear and performs a find in Projects in the Date field. The Set field when evaluated might look like this if the user selected gMonth = Jan and gYear=2010: 1/1/2010..2/1/2010 This is Filemaker's way of finding a date range. The ".." is in quotes, and is a literal string.
Lee Smith Posted January 16, 2010 Posted January 16, 2010 Read about [color:blue]Finding ranges of information in your User Guide and / or Online Help when FileMaker is open. This is a very basic need in finding records, so the more you understand how this works, the better off you will be. HTH Lee
tolga Posted January 17, 2010 Author Posted January 17, 2010 Yes you're right. I need some basic information. But I have a limited amount of time because of my job. So your answers and examples to my questions are very helpful to me. I'm making a DB for my personal needs in my job (heart surgery). It's nearly finished (I' ve started to enter data). But need some small adjusments like this one. So your answers are saving my days. I' ve modified the set field step acording to my DB. But "an operator is needed" dialog apears. I' m trying to find the error.
bcooney Posted January 17, 2010 Posted January 17, 2010 Tolga, Forget the scripted find. Just learn how to do a find for a date range. Barbara
Lee Smith Posted January 17, 2010 Posted January 17, 2010 (edited) I been trying to attach a modified copy of file, but it isn't uploading for some reason. Your script should look like this. FindMonth Enter Find Mode [ ] Set Field [ KVC Veritabanı:Yatış Tarihi; [color:blue]Date ( KVC Veritabanı::gMonth ; 1 ; KVC Veritabanı::gYear ) & ".." & Date ( KVC Veritabanı::gMonth +1 ; 0 ; KVC Veritabanı:: gYear ) ] Perform Find [ ] Note: you have to put data in your global fields. i.e. gMonth the number for the month, 1, 2,3, - 12 and gYear equals 2010 or whatever the year is that you are searching for. HTH Lee Edited January 19, 2010 by Guest
tolga Posted January 18, 2010 Author Posted January 18, 2010 Thank You Mr. Smith and Barbara (and also Michael). I' ve solved all my problems. And now managed to make that script (with your help of course) and some extra layouts to peforme find operation. It works fine. See you in my next trouble. Won't take too long I think. Tolga
Recommended Posts
This topic is 5424 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