3 Replies Latest reply on Sep 7, 2010 7:20 PM by MichaelM

    Save AS-  new file not identical w/r/t relationships



      Save AS-  new file not identical w/r/t relationships


      Good day-

      For years I have found answers to most every problem I have w/o posting here.  But now I am stumped by what may be a bug? 

      summary:  I have a database in which a relationship driven dropdown list works perfectly in the file in which it was origianly built.  BUT if I either change the file name, or do a SAVE AS to build a new file, that list no longer works.  

      ALL tables are in the same file- i.e. no external tables.

      more details:  our project mangers have lots of tasks they can do.  Every task has a vendor.  The datbase has "vendor table" with ALL vendors in it. If the task is an internal task, then the drop down box shows only internal vendors.  If the task is a design task, the drop down shows only design vendors etc.  Rightly or wrongly, I build the drop down box by relating a field in vendor table to a field in the task table with a helper table called tps_vendor_types.   (see the attached screen shot of the relationship graph)

      so I build a value list from tps_vendor_types so every vendor is one of 3 allowed types.  (there are only 3 entires in the tps_vendor_types table)

      then, dynamically I can build a value list of "available" vendors from the table relationships.  When a task is edited, only the appropriate vendors appear in the drop down box.

      It works GREAT, until such time as I either do a save-as or change the name of the file that conains all tables etc.  In any file that does not have the name of the original developemnt file,  the value list of available vendors does not populate properly.

      Any help out there?   

      thanks-  michael


        • 1. Re: Save AS-  new file not identical w/r/t relationships

          Are you sure you have no external file references? This sounds exactly like that issue. If you select Manage | External Data Sources, can you confirm that nothing is listed here? It's possible for a file to have an external data source reference to itself so check for any entries in this section.

          If that's not the case, check the details of how this value list is defined. Certain special functions may specifically refer to the current file by its name and they will then break if you rename the file. If your value list draws its values from a calculation field that uses one of them, you may end up with an empty value list when you rename your file.

          ValueListItems is one such function unless you've specifically used it with this format: ValueListItems ( get ( FileName ) ; "valueListNameInQuotes" ).

          • 2. Re: Save AS-  new file not identical w/r/t relationships


            I think that somewhere you used the ValueListItems ( ) function, hard-coding the FileName instead of using Get( FileName )

            Edit: Phil, I didn't see your answer.

            • 3. Re: Save AS-  new file not identical w/r/t relationships

              You guys are the best.  Buried deep in a case statement there was indeed a hard coded ValueListItems.  Thanks to your direction and the Database Design report it was a quick fix.

              THANK YOU BOTH-   michael