Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About rbrouwer

  • Rank
  • Birthday 05/15/1970
  1. Brillant ! So make a variable with every number in the field I need to parse from a "^" so then I can have a search string that works ! Thanks very much, works a treat.
  2. I have a text field which contains a code that is in the format of M followed by 5 numbers, which varies in position in the field and the actual numbers vary as well eg. M80410, M60234 etc. I want to make a calculation that extracts just that code from the rest of the text in that field. I tried using: Middle(text field;Position(text field;"M#####";1;1);6) Trying PatternCount (text field;"M#####") failed as well. I then realised that the the wildcard # for numbers (and wildcards in general) didn't work in calculations. I can't figure out how to tell the middle function to look for an M followed by 5 numbers in the text field. Thanks for any advice.
  3. I am having trouble finding an elegant solution to this problem. I have a portal which displays 50 records on a layout. However the found set can contain from 1 to 500+ records. What I am not sure how to do is allow a button to be created if the count of records is greater than 50, so the user knows that there are more records found and can click on the button to show those records in the portal and so on for the next 50 etc. This is exactly like the forums here, where x number of records are shown on a page with buttons at the bottom to go to page 2, 3, 4 etc. I can achieve this with multiple layouts and scripts, but I need one of each for each set of 50 records and I am sure there must be a more elegant and tidy way of doing it. I thought about the button in a portal technique but this gets a bit messy. Any advice appreciated.
  4. Printing related records from more than one file

    My question was what do you do if the data comes from three Related files - how do you get it all to display on the one report ?
  5. I am trying to make a printed report containing data from 3 related files for a cancer meeting. The three files (Treatments, Investigations and Pathology) can contain variable number of records. This works fine in Browse mode using portals and this is how the meeting is run. At the end we need to generate a report for filing in the patient history. Printing a list view of each means I need 3 pages minimum, when the amount of data in most cases will fit one page. I've tried putting portals in a report, but as the number of records varies there is either a lot of empty space or not enought portal rows. Any ideas appreciated.
  6. Value in a portal as trigger for a relationship

    Great tip -works beautifully. Thanks very much.
  7. I have a list of values in a portal. What I am trying to achieve is that if a certain value appears in the portal, this can be used to trigger a relationship. ie. A portal shows all the possible diagnoses a patient has. If one of these diagnoses is "rectal cancer", I wish to be able to recognise this in a calculation - something like Case(portal contains "rectal cancer", 1, ""). The problem I have is that this only works if the diagnosis "rectal cancer" is the first related value in the portal (as I understand it FileMaker only evaluates the first related record). To solve this I was thinking that if I had a field that became populated by all the values in the portal as a list, I could then use something like Case(field based on portal="
  8. date filter headache

    Thanks very much for all your help...I have got it working it seems. The calculation (unstored so it refreshes) Case(date_next_mdm >= Status(CurrentDate) and date_next_mdm < Status(CurrentDate) + 15, 1, date_next_mdm < Status(CurrentDate),2, date_next_mdm >= Status(CurrentDate) + 15,3, "") The script: Looping script which sets a text field (patient_status) to "current, past of future" depending on whether a 1,2 or 3 is returned by the above calculation. The script triggers whenever you navigate to the page which displays the portals. The relationships: Auto-enter text field with either "current, future or past" : self-join to patient_status field on which the portals are based. Your suggestions were great ! Thanks. And I promise to read 'smart ranges' ... but right now after work my cognitive abilites are seriously diminished.
  9. date filter headache

    Thanks for the advice about not using Today function. My idea is for 3 portals, one which lists patients who are due to be seen in the next 14 days (from the current date), one which lists patients who are due to be seen after the next 14 days, and the third which lists all patients that have been reviewed in the past (ie before the current date). I was toying with a calculation using Case and filtering the portal based on the 3 different results it will return based on which category a patients date of review falls in. ie. Case (date is in next 14 days, 1, date is more than next 14 days,2 date is in the past,3) I'll try out the ideas you've suggested and let you know. Thanks for the advice.
  10. I'm sure there is a simple solution but my brain can't quite see it at the moment. I'm trying to make a calculation based on whether a date in the future is within 14 days of the current date, more than 14 days in the future from the current date or less than the current date (ie. in the past). I tried date > Today +14 date < Today +15 date < Today .. and various combinations. The idea is to apply the results to a portal so I can show the three different sets of patients who are to be reviewed in the next 14 days, or who need review more than 14 days from now and those who have been reviewed in the past. I can't get it to work and any ideas much appreciated.
  11. Toggle window ?

    Thanks kindly. Both suggestions work. Sorry I haven't updated my profile, the version is FMP 7 :-)
  12. Toggle window ?

    I was wondering if there was a way for Filemaker to see if a certain window existed and refresh it if it did, but create it if it didn't, so that a certain window could be "toggled" with a button, rather than getting new copies of the window each time the button was clicked. I tired using an IF/CASE statement with the WindowNames function, but it didn't work. Any ideas ?
  13. Thanks very much for you advice and it works like a charm. The only modification I had to make was with the Patient file, as this was related to the Episode file via PatientID, not EpisodeID, as one patient could have many Episodes. But the technique works well using _gPatientIDs. It is a great technique and so much easier than dealing with looping scripts - Thanks again. I am just having a spot of bother with the actual importing. The script that isolates the related files runs in the old Runtime solution, but is called from the new one, yet the import scripts run in the new Runtime solution. The problem is that as the files are named the same, the scripts get confused which file (old or new) they are importing from. Would changing the extension in each new Runtime version stop this problem ?
  14. I have a runtime solution containing 4 related files (Patient, Procedure, Diagnosis and Complication), based around the master file (Episodes). I can import all the files into an updated version of my Runtime solution. I can also import a subset of Episodes by doing a Find for dates of admission. My problem is, how do I then import the data from the 4 related files just applicable to that subset of Episodes I imported into the updated file ? I was thinking of a looping script, which goes to the first Epidsode I wish to import, then finds the related files in the 4 other files, performs import (as only the found set is imported I think), then goes to the next record in Episode and repeats....but I'm not to sure if this will work or how to implement it. I would really appreciate any advice, it's really the only thing holding back my solution.

Important Information

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