5 Replies Latest reply on Feb 3, 2010 4:51 PM by deltatango

    Drop-down and Pop-up problem



      Drop-down and Pop-up problem




      I have a 1:1 correspondence between Asset and User. Asset has user_id column.


      What I would like: when I look at Assets I would like to display full name of the user, and have ability to change user this asset belogns to (via dropdown or popup), but not allowing any changes to the Users info.


      What I tried: created value list called 'Users' which are based by user id and show Full Name in second field only. When i have it, when i am displaying the data i would see an id but then when i click i would see dropdown with user names. Seeing id is very inconvenient because I have to click to see who the user is. 


      I also tried to create a 1:1 relationship between Asset and User, and then in the Asset layout for Asset.user_id field to specify Full Name from the User table. Problem: when i click in the field i can change the value, and that changes the Full Name in the (User), which I do not want. And I suspect it acually puts id value in the Full Name as well into the user table. Even with popup I could still corrupt the user full name.


      Any help is appreciated.


      Thank you.


        • 1. Re: Drop-down and Pop-up problem

          Use a pop-up menu instead of a drop-down list for the user field.


          make sure the field with the popup menu is the asset.user_id, not the user.user_id field.


          You don't really even need a relationship unless you are pulling extra data for calculations, etc. 

          • 2. Re: Drop-down and Pop-up problem

            That works as long as your user names are unique. If you get two people with identical names, you won't be able to select the second individual.


            You can either enforce unique values on your user name field (And add a middle initial or some such to distinguish between same named individuals) or you can show both columns in your value list and add the field from the related table next to your drop down field. You can block access to the field with Field/Control | Behavior or (better) use access privilege settings to prevent editing the name field.

            • 3. Re: Drop-down and Pop-up problem
                 The tables are linked via integer primary/foreign key, which is unique.
              • 4. Re: Drop-down and Pop-up problem

                deltatango, i tried again with pop up and i think i works after i removed the relationship - i can not edit anything in the field.


                Thanks a lot

                • 5. Re: Drop-down and Pop-up problem

                  Roman, Phill brings up a good point, however - 


                  If you only show the second field,


                  Record 1 - Joe Smith and

                  Record 2 - Joe Smith


                  Will only appear once on the value list. You should show both the record ID and the Name to prevent grouping of the second field.