1 2 Previous Next 18 Replies Latest reply on Nov 21, 2012 1:05 PM by tays01s

    Pop-up synchronising fields and portal data

    tays01s

      Title

      Pop-up synchronising fields and portal data

      Post

           I've got a file at:

           http://dl.dropbox.com/u/9270656/FC%20Crit%20v0.2a.fmp12

           that pulls Prescriptions and Records onto the Patient layout through separate. Seems to work fine in that going from patient to patient the related prescription and their related records turn up in the portals.

            

           However, to make it easier to use I wanted the last&firstname as a pop-up as a value list on PatientID. However, this a) did not synch with Patient fields or portal data and b) blanked portal data as in the 2nd file at:

           http://dl.dropbox.com/u/9270656/FC%20Crit%20v0.2%20Copy.fmp12

            

           I'm bound to be missing a fundamental rule.......but haven't learned what yet!

        • 1. Re: Pop-up synchronising fields and portal data
          philmodjunk

               Use a calcualtion field to combine first and last name in a single field and specify text as the return type.

               The simplest approach (not necessarily the best), is to define your value list to list PatientID--this should be an auto-entered serial number, as the first field (Primary field) and the calculation field that combines first and last names as the secondary field. This allows you to use the name to select a patient, but the ID number is what is entered into the field when you select a value from this value list.

               More sophisticated approaches are possible such as the method in this demo file, but require scripting to handle all the issues involved.

               This demo file allows you to use an auto-complete enabled value list of names for selecting a record, but scripts both look up and enter the corresponding ID number and also handle situations where two or more records have identical names.

               FileMaker 12 users: https://dl.dropbox.com/u/78737945/SimpleNameLookupDemo.fmp12
               Pre FileMaker 12 Users: https://dl.dropbox.com/u/78737945/SimpleNameLookupDemo.fp7

          • 2. Re: Pop-up synchronising fields and portal data
            tays01s

                 I tried the 'simplest approach' you mentioned. Initially it appeared to work, but:

                 a) When the pop-up was used, it failed to change the Firstname, Lastname fields and

                 b) I found that the PatientID in table view was changed to drop-down text and that the ID numbers were changing.

                 Hence I put the example files on drop-box for people to see what was happening.

            • 3. Re: Pop-up synchronising fields and portal data
              philmodjunk

                   a) why are there first name and last name fields to change? If you need to put them on your layout, you should include them as related fields from the original table. Then, if your relationship is based on the ID number, selecting a name from the value list autmatically displays data, such as the names, from the related table.

                   b) This doesn't sound like you have the correct field set up with the value list format, or you have the wrong field specified as the primary field in your value list set up.

                   Your download link doesn't work until you add ?dl=1 to the end of it. In looking at it. On which layout do you want to use this value list? And what result do you want to see. Using it on the Patient layout doesn't really make sense unless you want to use this drop down to find a patient's patient record. And the value list defined in this file does not match what I am describing for you.

                   Please spell out exactly how you want to use this drop down and then I will respond with instructions in terms specific to the file you have shared via Drop Box.

              • 4. Re: Pop-up synchronising fields and portal data
                tays01s

                     I wanted to be able to:

                     1. Enter new patient records on the Patient layout

                     2. From the 'Patient' (fullname) popup switch between patient records and

                     3. Pull up their Prescriptions and Records via portals. I could then enter new Prescriptions/Records from the portals.

                     Is that adequate as an explanation of requirements?

                     Thanks,

                     Stephen

                • 5. Re: Pop-up synchronising fields and portal data
                  philmodjunk

                       Let's stay focused on your pop up. You want to use this field to FIND an existing Patient record.

                       You need to add a new field for this purpose as you don't want using this popup to alter the ID or name of the current Patient Record.

                       Go to manage | Database | Fields and add a number field and specify global storage in field options for it. This field may be defined in any table. I often add an extra table just for such global fields. We'll call this field, gSelectPatientID.

                       Format this field with a value list where PatientID is the primary field and your full name calculation field is the secondary field.

                       Now write a script that uses the value selected in this field to find a patient record:

                       Enter Find Mode [] ---> clear the pause check box
                       Set Field [Patient::__PatientID ; GlobalFields::gSelectPatientID ]   ---> gSelectPatientID must have global storage specified or this won't work.
                       Perform Find[]

                       You can perform this script by adding a button next to the pop up formatted copy of GlobalFields::gSelectPatientID or you can use a Script Trigger. OnObjectModify works well with popup menu, radio button and checkbox formats. OnObjectSave works better for Drop Down List formats. Then, when you select a patient from this value list, the script will automatically find that record and display it.

                  • 6. Re: Pop-up synchronising fields and portal data
                    tays01s

                         Is there something missing from:

                         Enter Find Mode [] ---> clear the pause check box
                         Set Field [Patient::__PatientID ; GlobalFields::gSelectPatientID ]
                         Perform Find[]

                         because the enable button isn't active. ie. do I have to specify in the [ ] for the 1st/ 3rd lines?

                          

                    • 7. Re: Pop-up synchronising fields and portal data
                      philmodjunk

                           enable button??? what's that?

                           The brackets shown as empty should be left empty.

                      • 8. Re: Pop-up synchronising fields and portal data
                        tays01s

                             Apologiies, it's now a GIF. See screen capture

                        • 9. Re: Pop-up synchronising fields and portal data
                          philmodjunk

                               What file format did you try to upload for your screen capture? Only jpg, gif or png files may be uploaded directly to the forum. All other formats such as the actual database file or a PDF, would need to be uploaded to a FileSharing site such as Drop Box and then the download link may be posted here.

                               On the other hand, sometimes you upload an image file of the correct type and it doesn't appear with the posted message until after a large delay, so I may see your screen shot after I post this message and the screen refreshes. (I've been reloading the page off and on for quite a while before posting this...)

                          • 10. Re: Pop-up synchronising fields and portal data
                            tays01s

                                 I've replaced with a GIF

                            • 11. Re: Pop-up synchronising fields and portal data
                              philmodjunk

                                   You have FileMaker Advanced. The enable/disable button is used to enable or disable a selected script step as part of debugging and design tests. It's a way to "turn off" a script step without deleting it from the script.

                                   It has no bearing on this script as we want all the script steps to be enabled.

                              • 12. Re: Pop-up synchronising fields and portal data
                                tays01s

                                     OK I've assiged the script with an 'onobjectmodify' trigger. When I now use the popup all the 'Patient' fields switch to find mode. I don't yet see how this helps.....I was hoping that the Patient fields would 'follow' the popup selection.

                                • 13. Re: Pop-up synchronising fields and portal data
                                  philmodjunk

                                       Better check your script again. Sounds like you either have the wrong step or have

                                       Enter Find mode [pause]

                                       when you should have:

                                       Enter Find mode []

                                       The script should find the patient record using the info selected in the pop up menu.

                                  • 14. Re: Pop-up synchronising fields and portal data
                                    tays01s

                                         Script appears as you wrote it with no pause. However, as suggested I did put the global field in a global table. The latter is not related, in the relationship diagram, to Patients. It's the first time I've used a global field there not sure of the 'relationship rules'. I've put the file on DropBox

                                         https://dl.dropbox.com/u/9270656/FC%20Crit%20v0.2%20Copy.fmp12

                                    1 2 Previous Next