1 2 Previous Next 15 Replies Latest reply on Apr 23, 2012 5:54 PM by JCPython

    get search results in a value list?

    JCPython

      Title

      get search results in a value list?

      Post

      im trying to find out if i can populate a value list with a foundset, i have a table to holds many different names of species, and the type of species it is, i want to have a value list that displays all the species of a selected type, but i dont see how a value list can show foundsets, so maybe there is a more to it way rather then a easy filemaker built in function?

        • 1. Re: get search results in a value list?
          philmodjunk

          You can't just set a value list to list a found set, but it doesn't seem like you need to here. A conditional value list is a value list where you select a category in field 1 (such as your type) and then a value list on another field updates to list only values that are a member of that category.

           Here are some links on conditional value lists that you may find useful:

          Forum Tutorial: Custom Value List?

          Knowledgebase article: http://help.filemaker.com/app/answers/detail/a_id/5833/kw/conditional%20value%20list

          Demo File: http://www.4shared.com/file/f8NsU2DJ/ConditionalValueListDemo.html

          Hierarchical Conditional Value lists: Conditional Value List Question

          Feel free to post follow up questions here if those links aren't enough to get your value lists working correctly.

          • 2. Re: get search results in a value list?
            JCPython

            I followed the knowledgebase article and it worked for the most part, problem is...

             

            i have another table with similar data, only its a bit more complicated.

            the table setup is for mutation (morph) of the animals and the mission is the get only certain morphs from the database to appear in a conditional value list

             

            i tried the above method for this BUT with each and every morph there is a field to record the genetic type of morph it is, such as (Recessive,Co-Dominant, and Dominant). each morph also has a field to describe its mutation type such as (Basic,Designer)

            each morph record can only be either basic or designer, not both, but they can all be multiple genetic type, so when i select to only show in the conditional value list just the recessives, it will show all morphs with recessives, even if its a combination of genetic types, i need it to only show records that are only one genetic type (Recessive) and basic.

             

            is this going to include an addtional conditional value list?

             

            Hope that made sence.

            • 3. Re: get search results in a value list?
              philmodjunk

              One conditional value list should still serve but the multiple fields complicates the relationship you'll need for the conditional value list.

              Please give some examples of how you want this to work so that I have a clear example of what you are dealing with here.

              What kind of categories do you need to select from in order to limit the values listed?

              How are those values stored in the table from which you will draw these values?

              From there, we should be able to put together some combination of calculation fields and/or multiple field relationships that will produce the desired value lists.

              • 4. Re: get search results in a value list?

                You can use a global field to store data that is used in a value list. Just point the value list at this field. Now you have a value list that can be changed at will or at john, sally...

                For instance, a value list of open Filemaker files can be useful. So, set the global field to the function Databases and the value list will show the open database files. Or use the windows function for the window sopen in the current database. Or loop through a found set and add the value in a field to this global field.

                set global field ""

                loop

                set global field to global field & P & textfield

                go to record next exit after last

                end loop

                Another really cool use of the global field, say for a list of zip codes found by searchiing a zip code table for your local county, is that you can create a portal based on this global field and your address records! Quick find four records in this county!

                • 5. Re: get search results in a value list?
                  JCPython

                  One conditional value list should still serve but the multiple fields complicates the relationship you'll need for the conditional value list.

                  Please give some examples of how you want this to work so that I have a clear example of what you are dealing with here.

                  What kind of categories do you need to select from in order to limit the values listed?

                  How are those values stored in the table from which you will draw these values?

                  From there, we should be able to put together some combination of calculation fields and/or multiple field relationships that will produce the desired value lists.

                   

                   

                  here is an example of the tables i have with everything working:

                  http://www.4shared.com/file/_VoHiS8T/Reptiles3.html

                  you can see that there are several different morphs names and they all must be either a basic or designer "Mutation", but never both.

                  they are all all must consist of atleast one or more "Gene" (recessive,co-dominant, or dominant)

                   

                  you will notice on the morphs layout that there is a portal to the right for recording multiple genes that are apart of a designer morph.i can add and remove as needed.

                   

                  im trying to do the same thing for what is called Heterozygous Genes (Het.)

                  so i need to...

                  another portal to load multiple morphs into just like the portal to add multiple Genes, however the dropdown list on the portal can only consist of morph records that are "basic" AND ONLY "recessive"

                   

                  This is just a sample file but it is the exact same in my solution.

                  • 6. Re: get search results in a value list?
                    philmodjunk

                    You already have a relationship that uses a calculation field, cStringBasic, that always returns "basic". If you add another field, cStringRecessive, you can set up this self join between two occurences of your Morphs table:

                    Morphs~designers::cStringBasic = Morphs~BasicRec::Mutation AND
                    Morphs~designers::cStringRecessive = Morphs~BasicRec::Genes

                    Then Morphs~BasicRec can be your source of values for only basic and recesive MorphID's as long as you specify Morphs~designers as the "starting from" table occurrence in the value list set up.

                    • 7. Re: get search results in a value list?
                      JCPython

                      Im confused, I added the extra fields, table and relationships, as you can see in this file:

                       

                      http://www.4shared.com/file/YScVfVpD/Reptiles3_Copy.html


                      I also added a second portal on the reptiles layout to act the same as the above portal , to add one or more het morphs to the selected reptile record. it still only showing more then just basic recessive morphs in the list though, and its also not allowing me to add more than one het morph into the portal.

                       

                      Any clue where i went wrong?

                      • 8. Re: get search results in a value list?
                        philmodjunk

                        The value list is based on Morphs~basics vl instead of Morphs~basicsRec.

                        The drop down list formatted field in the portal refers to DesignerBasics_A::BasicID instead of ReptileHets::MorphID (I had to add this field to the table.)

                        Your MorphName field underneath the drop down field won't work. You need an occurrence of morphs directly linked by ReptileHets::MorphID to MorphID in an occurrence of the morphs table.

                        I'm not sure this is really what you want here. The use of MorphID in the various relationships doesn't totally make sense to me here as you have a MorphID for each reptile record but now appear to need Different MorphID's for the records in the ReptileHets table.

                        • 9. Re: get search results in a value list?
                          JCPython

                          Great! i have fixed the errors you pointed out and works great, as far as why there was morphID for various relationships, im not sure, that example was actually made by Laretta last month. it works very well in my current solution.

                          • 10. Re: get search results in a value list?
                            JCPython

                            I have it all working in that example file i sent you, but when i try to add it to my current solution im getting no results, i looked at everything i can think of aand it all seems the same, i recreated the relationships, added the right tables and fields, added the value list and still no results, i must be missing something somewhere, could be minor but major.

                            • 11. Re: get search results in a value list?
                              JCPython

                              and the value list...

                              • 12. Re: get search results in a value list?
                                JCPython

                                Still having trouble getting my results to show in the dropdown list, i however just noticed when i go into browse mode and click the arrow of the dropdown a blank list apears, if i type anything in the dropdown list field, commit the record then try clicking the arrow again, i get my results, i think thats odd, any idea on what the cause of this can be?

                                • 13. Re: get search results in a value list?
                                  JCPython

                                  Also one thing i never understood from that example and maybe its common practice and you can tell me what it is, im reffering to the text field that is placed over top of the drop down list, i just dont understand what the purpose of that field is for...

                                  • 14. Re: get search results in a value list?
                                    philmodjunk

                                    There is no need to place a text field over the drop down list unless you want to hide the ID number and only display the name while still using a drop down list instead of a pop up menu. If you use the pop-up menu optiion, there's no need for it at all.

                                    With regards to the preceding issue. You'll need to double check the details.

                                    Confirm that your return types for cStringBasic and cStringRecessive are both text, not number.

                                    Confirm what table occurrence is specified for your layout. If it is based on Morphs~Designers, the "starting from" table in the value list set up should be changed to Morphs~Designers intead of Reptiles.

                                    1 2 Previous Next