6 Replies Latest reply on Dec 18, 2013 11:11 AM by raphthepenguin

    editing DynamicValue list


      I am having a Dynamic Value list of Schools.

      My goal is that once a school is selected the corresponding Data is shown.


      So I have a on modify script

      It searches for the schoolname and persons ID and then shows the contacts.

      It is all working so far.

      The only problem I have is, adding a new school. Once a key is pressed the script runs.


      My Idea for the solution is having a new layout (same look), and a new field dev_schoolname.

      The value list would then come from the dev_schoolname field. Once a new school is created it would add it to the list...


      But this sounds to me like a huge workaround. I guess it would work. But I am still learing alot with FM and was wondering if there wouldnt be a way easier solution to this!?


      Any help or Idea is very welcome!


      Thanks people, you are great!



        • 1. Re: editing DynamicValue list

          Any Ideas anyone?

          Every Help is welcomed!

          • 2. Re: editing DynamicValue list

            raphthepenguin wrote:


            The only problem I have is, adding a new school. Once a key is pressed the script runs!


            Your description is somewhat confused, but I (think I) gather that you are using the actual data field on your layout to do the scripted search. If so, don't! Create one or more global fields to hold your search criteria.


            Best you post a compressed copy of your database here (via the Advanced editor).

            1 of 1 people found this helpful
            • 3. Re: editing DynamicValue list

              Sorry for the confusion.


              So basically I have a one to many relationship. One person can do many schools.

              Instead of using a school key I have the name as key (maybe this is a bad Idea).

              So in theory it would be a many to many but I am not using it that way... (now that I write this I start second guessing myself).


              But instead of a portal, Id like to search for A school, then be able to enter relavant information.

              I think I get what you are saying now with the global field. I am out all day, but I will have a look into it.


              Here is also the file. Maybe I am going the wrong way completely here.

              Click on School Accounts. This will get you to the right layout.

              • 4. Re: editing DynamicValue list

                I took a look--you have lots of problems....:)  I say that with I smile because I have been there.

                Many of the scripts (new school) for example are just wrong.  Circular references, deleting the names, etc.  Yes using the persons name for PK/FK's is absolutely where the problem begins. 

                Also, from my beginner's perspective, my first database had alot of unneeded extra, complicated stuff.  But then as I learned, and received lots of help in both forums, I went back thru and was able to eliminate (combine) some of the layouts, eliminate all the extra table occurances, and re-write the scripts.


                Do not dispair, learning is fun.....right?  And you'll get better at it, and quickly gets easier.  I'm sure someone can give you more detailed help At the very least I bumped you up to the top

                • 5. Re: editing DynamicValue list

                  So a start would be getting the relationships right.


                  Maybe like this.

                  Contact >--< School


                  Every contact can do many schools, every school has multiple contacts. Where would the Application and Accounts go? In the joint (contactschool).


                  The reason I tried to stay away from all the relationships is that I didnt want to use portals for the information. Like the application in the Tab because that is what the enduser wanted (The Tabcontrol has more tabs, this is just a version showing the issue).

                  • 6. Re: editing DynamicValue list

                    Ok I did it.

                    With creating a whole new table and everything works now...


                    Two Questions:

                    - Is there a way to sort the Value list (by Date)?

                    - Is there a way to show related records in the tab other then with a portal? The enduser wants it that way and I feel like the only way of doing that is "faking" a new layout that looks the same but actually is on a different table... Am I right?


                    Thanks for any help!