Newbies shyam Posted June 5, 2005 Newbies Posted June 5, 2005 Hello, My name is Shyam and I am a student very new to Filemaker. I am using 'FileMaker Pro 7' database on MAC OS X (10.4.1) for a project at my university. In one of my layouts I have a pop-up menu. At the time of data entry, this menu displays the contents of a value list of user-ids. However, I want my pop-up menu to display a list of user-names. Once the user selects a particular user-name, I want the field's value to be replaced with the corresponding user-id (that is found by matching the selected user-name to a user-id from another table). Is there any way to do this? I would really appreciate any help in this matter. Thanks, Shyam
Vaughan Posted June 5, 2005 Posted June 5, 2005 Yes and no. A common method is to set the value list up so that it also displays the usernames. Then, on the layout, put a related field that displays the username (but dis-allow entry to the field) next to the field that people use to select the userid.
MoonShadow Posted June 6, 2005 Posted June 6, 2005 There is another option. But it will only work if you can ENSURE the UserName is unique. If you go this route, I'd suggest adding strict validation to your UserName field (in your related User table) with validate unique and search for duplicates (just to be sure) before starting the process. And it will require an additional text field in your main file to hold your UserName (I know, a bit of redundancy but IMO worth it to get popups that only show names). This new UserName text field won't be used for anything except this process for your popup. Leave your standard data relationship alone. Establish validation on this new UserName field via calculation and simply put Related::Username in the calc box. Make it strict and don't allow override. Create a NEW relationship from your main table to your User table (maybe called UserNames) and join Main::UserName (this new text field) to Related::UserName. Then, on your UserID field in Main, set up Auto-Enter by lookup, select this new UserName relationship, and select your related UserID. Be sure 'Do Not Copy if No Exact Match' and 'Do Not Copy if Empty' are both CHECKED. Attach your UserName value list to this new UserName text field. When a selection is made, it inserts the related UserID in the Main UserID field. Just remember that, if there is a possibility that UserNames won't be unique, it won't work. Although it should be used with caution, it's worked well for me on several occasions.
Newbies mfkap Posted June 8, 2005 Newbies Posted June 8, 2005 I am attempting to do the same thing, and running unto a user interface problem. I have a table (Product) that contains a field location_id, and I have a table (Locations) that has 2 fields, location_id and Location_Name. Users can create new locations with any name they want, and the ID is serialized. They want to be able to change the location on the Products layout. I have a popup that displays all the values from the location_name field. This might be asking the same quesiton again, but for clarification, is there any way to have the user select a new value in the location_name field and have it change the location_id on the product table to the corropsonding location_id from the location table? If not, is there a way to display "Click Here to Change Location" in the location_id box instead of the current location_id on the table?
MoonShadow Posted June 8, 2005 Posted June 8, 2005 For clarification ... The option to enter only names into popups is a continual request. Nobody likes seeing the IDs too. I hope FileMaker pays attention to these requests. In the past two years, there have been hundreds of posts that I've read wanting this ability. Check out the file at the end of this thread. It's an easy process to implement. Pay close attention to proper validations when using it however. I love the ability. It's too bad we have to provide these kinds of work-arounds (and a redundant field). But I think it's well worth it. I learned this from Ray (CobaltSky) a few years back.
Recommended Posts
This topic is 7109 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now