6 Replies Latest reply on Sep 21, 2012 11:06 AM by NaturSalus

    Multiple Choice Portal Picker

    NaturSalus

      Title

      Multiple Choice Portal Picker

      Post

           Hello,

      Every time that I need to choose a value from a lengthy (> 100 items)  value list I use Phil Caulkins Picker demo (enhancedvalueselection).

            

      Let's say that I need to add different values to a field on an entry portal.

      To do that, there is as entry button that, when clicked by the user, fires a script that brings in a pop up window with a filtered selection portal from which the user can select the desired value. Once the user clicks on the desired value it is added to a row in the entry portal. 

      This process can be repeated as many times as needed.

      This has been my method of choice for selecting values from a lengthy value list since Phil patiently taught me his method.

            

      The “new” challenge that I am facing is selecting values from three fields: Category, Subcategory and Rubric.

      This time there user has to choose values from three related fields (Category --< Subcategory --< Rubric): first from the Category, then from the Subcategory and finally from the Rubric field.

      So once the pop up window shows the selection portal with values for the Category, Subcategory and Rubric fields, I need a way to filter for the values of each field: first filter for Category values, then for Subcategory values and finally for Rubric values.

      The rest of the process: selecting the desired value and adding them to the entry portal would be the same as for the selection of just one value.

      In my current setting the three fields belong to the same table: Rubric, because they are different levels of describing the same entity: a “rubric”. But I understand that I would have to split them into 3 tables, if needed, in order to filter the selection portal.

            

           My question is: what is teh best way to filter the selection portal for the values of three fields?

      I really don't know what strategy to pursue:

             
      •           a modification of Phil's enhancedvalueselection approach
      •      
      •           a hierarchical portal
      •      
      •           or what?

            

      Thanks,

      natursalus

        • 1. Re: Multiple Choice Portal Picker
          philmodjunk

               Interesting challenge...

               I don't think you'll need to split up your data into three separate tables though you'll need extra occurrences of the same table in your relationships graph.

               This is essentially the same as a set of hierarchical conditional value lists, but the relationships you'd use for the conditional value lists, you can, instead use for your portals.

               Hierarchical Conditional Value lists: Conditional Value List Question

               PS. I am remembering correctly that you are not using FileMaker 12?

          • 2. Re: Multiple Choice Portal Picker
            NaturSalus

                 Hello Phil,

                 Thanks for the speedy answer.

                  

            PS. I am remembering correctly that you are not using FileMaker 12?

                 I got FM 12 v2 and although I am a bit scary about its still undisclosed "hidden features", I am open to learn new tricks (SQL maybe?)

                 So every suggestion you make with FM 12  v2 will be advidly appreciated and  tried smiley

                 Thanks,

                 natursalus

            • 3. Re: Multiple Choice Portal Picker
              philmodjunk

                   Hmmm, I've been playing around more and more with ExecuteSQL. It's a major game changer in how it can really prune a relationship graph down to the bare essentials. I've even ben able to set up a calculation field that uses ExecuteSQL as a "selection list" much like the selection portal methods used in the method I've taught you, but does not require a specific relationship in the relationship graph to make it work. The key limitation, however, is that I haven't found a good way to make this work when also formatting the field with a scroll bar so that larger lists of results can be worked with. I have to use OnObjectEnter to capture and process a mouse click into the field and that trigger disables the scroll bar's ability to scroll as you have to enter a field to scroll it.

                   If you think that you can live with that limitation, let me know and I'll describe how it works. Otherwise, we can stick with the tried and true, but keep this tool in the back of our minds as it can also be used in a portal filter expression and/or a match field in a relationship--both tricks that can produce some pretty wild results.

              • 4. Re: Multiple Choice Portal Picker
                NaturSalus

                     Hello Phil,

                     Sounds really interesting what you are traying to do with the ExecuteSQL. I guess, I'll wait till you find a workaorund.

                      

                     As per your suggestion of setting up conditional value lists for the portal fields I tried but I didn't manage to make it work.

                      

                      

                     In a few words I will try to explain part of my convoluted design.

                     Starting from the Patient layout, based on the Patient TO, the user can create patient records. From each Patient record, the user can create as many Appointment records as needed.

                     Once an Appointment record, associated to a Patient record, has been created the user can add the Rubrics that match the patient's symptoms.

                     So, in a tab of the Appointment layout there is the Rubrics portal to the AppointmentRubric  TO that shows the Rubrics added to the current Appointment record.

                     Next to the Rubrics portal there is the Add Rubric button that fires a script that pops up a window with a Rubric selection portal based on your demo.

                     Hopefully you will be able to  spot my mistake in setting up the conditional value list for the Rubric selection portal.

                      

                     Thansk,

                     natursalus

                      

                      

                      

                      

                      

                      

                      

                      

                      

                     Show related records from: Selection_RubricForAppointment

                      

                      

                      

                      

                • 5. Re: Multiple Choice Portal Picker
                  philmodjunk

                       Hmmm, not quite what I pictured. I was imagining two or more portals where a selection in portal 1 (by clicking a portal row) updated portal 2 to list only the records appropriate for the values in the record clicked and then clicking a portal row in the last portal enters that information into the parent record. And each portal would be equipped with a search field and portal filter expression to help narrow the lists of records listed in the portals.

                       I don't see why you have formatted fields in the portal with conditional value lists.

                       There are two interface design options here that you might try:

                       I've just described the first option--use multiple portals.

                       A second option is to have two global earch fields, one for Category and one for Rubric. (and possibly a third for subCategory). You'd either select a category (and sub category) in the search fields from value lists, or use the fields in a more complex filter expression that filters on partial text matching on all thes search fields.

                  • 6. Re: Multiple Choice Portal Picker
                    NaturSalus

                         Hello Phil,

                    I don't see why you have formatted fields in the portal with conditional value lists.

                    Obviously I didn't get what you meant in the first place.

                    And now I understand why I din't manage to make it work, no matter how many different crazy relationships (not mentioned blush) I tried.

                         Now that I have a crystal clear picture of how to do it, I can try to play with both scenarios this weekend.

                         Thanks,

                          

                         natursalus