You'll need to describe your layout, table and what you want to do with this pop up menu in a bit more detail.
When you open Manage | database | Fields, do you have a table named Projects with two field definitions, Project 1 and Project 2?
When you click these two field objects on your layout while in layout mode, what do you see for each in the "Display data from" box found on the Inspector's data tab? Do you see different names for each or the same exact text?
What are you doing when you select a project from the value list?
Searching for a record for that project? Filling out data for a new record for that project? Or ???
Why do you have two fields, Project 1 and Project 2 instead of just one field named Project?
Thanks for your reply, Phil.
OK, here's some clarification on what I posted initially. Sorry it wasn't clear.
The idea is to have a "project name" picker from which to take the user to the correct layout, filter the projects for him based on what he selected from the picker (pop-up).
I created a test project that also demonstrates what I was writing about. In that sample project, I created a table called Test, and a table called Projects. There's a field called listValue. In that table, I have five records: Project1....Project5 in the corresponding ListValue fields. I told FMP to use the ListValue field to populate the pop-up (using Display Data From).
Then, when running the test application initially, the five project records appear as expected in the drop down. Fine. But, as I click on them over and over, FMP is overwritng them in the DB. After several clicks of different items in the pop-up, Project5 is gone and I have multiple records with Project2 and Project4. I have no idea what FMP is doing!
What I am trying to do is simply populate a "picker" (pop-up) with fields from the tables so the user can select one and then I can use that selection to continue in the application. There's no expectation on my part that any field data (in the ListValue fields) would be overwritten. A "picker", "pop-up", or whatever, should just be read-only, but that's not what's happening.
If I create a static list with hard-coded values, then FMP doesn't overwrite the values in the pop-up.
As to your question above, there's only one field to click on, the pop-up field shown -- see attached. The image below shows that "Project5" is no longer in the list. The actual database data for the 5 records show duplicate values for those shown below.
I'm clearly missing something basic here so I'd appreciate any insights on this.
Does this clear up my initial posting?
Thanks again in advance,
For starters, you need two fields one where you identify each project and which then serves as a source of values for you value list and a second field where you select the project in your drop down so that selecting the value does not modify the name of the current project record.
Open manage | database | fields and add a new field called gProjectSearch. Use field options to give it global storage. The script that I am about to suggest requires it to have this storage option.
Put gProjectSearch on your layout. Format it with your value list. The value list should be set up with the "use values from a field" option and it should specify the original project name field.
Now, when you select a project name from the drop down, you don't also change the name of your current project.
Use manage | scripts to create this script:
Enter Find Mode -->clear the pause check box
Set Field [Yourtable::ProjectName ; Yourtable::gProjectSearch]
When you select a project in the drop down and then perform this script, it will find the project record with the name that you specified. You can automate this by using the OnObjectSave script trigger on the gProjectSearch field to perform this script, then selecting a project in the drop down is all you need do to jump to the project record with that name.
Thanks for this insight into how FMP works. This was counterintutive to me.