4 Replies Latest reply on Mar 19, 2014 9:23 AM by MattClifton_1

    Dynamic value list will not populate



      Dynamic value list will not populate



           I'm developing a client-invoice database, and am having trouble getting a dynamic value list to populate. 

           I have a table called Clients and a table called Visits (essentially a work session for a client). Their relationship is such that a client may have multiple visits. 

           In Clients, there is pkClientID - a primary key with numeric auto-entered serial number.

           In Visits, there is fkClientID - the foreign key which matches pkClientID in the Clients table. This is also a number.

           On the main layout for Visits, I have the field fkClientID populated as a pop-up menu, with values set from a dynamic value list defined by "clients::pkClientID". (Clients also have a name field, which ultimately I will add as the "second field", and display only the name, but even sticking to the simple ID does not work).


           The trouble is that this value list does not populate - nothing appears in the field. I cannot even click into it.


           - the Field Behavior is set to allow entry in Browse Mode

           - I'm not concerned about tabbing at this stage, although that field DOES have a tab number associated with it.

           - The Clients table definitely has a unique numeric value for pkClientID in each record.

           - I don't use globals at all.


           The only thing that's perhaps strange about this table is that originally, I used a different field as its primary key (a text field with a 3-character code) and I created the numeric ID after the database was populated - I populated the unique numeric IDs using the "Replace Field Contents" function. However, I have since removed and re-added the relationship between Clients and Visits, using the correct numeric primary/foreign key pair.

           Now, If I create a NEW table called ClientTest, with ID and name, relate it appropriately to the Visits table, and fill in a few records manually, I CAN successfully display its values in a dynamic value list in the Visits layout. So I could try exporting the current Clients table out, create a brand new table, and re-import the data, but I'd like to know if there's anything I should check first.

           Hope that all made sense. Grateful for any advice.




        • 1. Re: Dynamic value list will not populate

               Did you perhaps click the "include only related values" option in Manage | value Lists?

               If so, clear that option. The relationship has nothing to do with getting your values to appear in this value list unless you select that option and for this value list, it should not be selected as you want to see a list of all Clients.

          • 2. Re: Dynamic value list will not populate

                 Thanks Phil.

                 No, it was set to "All values". 

                 I've (sort of) solved it now, but I still don't know what the exact problem was. 

                 I exported the Clients table, reimported as a new table and related the Visits table to that (instead of the old Clients table). I added a new value list for that table. However, that field then gave me a "target is not part of a related table" error (even though the relationship existed).

                 I then tried creating a new layout, thinking that starting from scratch by choosing the layout-table name would be best. Again added the field with the value list I'd created above, and this time it DID work. It actually even worked on that layout by re-linking the old Clients table. I then went back to the original layout, re-created the field control again linked to the original table and it worked.

                 All I can think is that something in my table-renaming, relationship-changing and key-updating got the system confused, and taking it back a few steps got things reset.


            • 3. Re: Dynamic value list will not populate

                   Sounds like an indexing or field type issue. Importing the data into a new table rebuilds the indexes such a value list uses. And it's possible that data from a field of one type was imported into a field of another type and that can also make a difference.

                   If you did not use the "include" option, the relationships defined have no effect on what appears in the value list. The tables don't need any relationship at all for the value list to display values though you do need the relationship for other obvious reasons.

              • 4. Re: Dynamic value list will not populate

                     Yes, the table originally was indexed on a text field, and I switched that to a new numeric field, so I think you're right about the indexing. 

                     thanks again -