Jump to content
Sign in to follow this  
PTKen

Popup list from related field

Recommended Posts

Hello. The answer to my question is probably already somewhere on this site, but in the half hour that I've been searching I did not manage to stumble across it yet. So...

I have a user table with a field for user_ID, user_FirstName, user_LastName, and user_FullName (which is a calculated field from the first and last name). I also have a value list which contains values from the field user_FullName.

What I would like to have is a popup list which displays values from the user name value list, but which enters the user_ID when selected. I'm not sure if I can do this the way I have set it up. Any ideas?

I also have a second similar problem. I have a field AI_priority which can contain the value 1, 2, or 3. I also have a priority value list that contains the text High, Normal, and Low. I would like to have a popup list that displays the text from the priority value list, but enters the correct number (1, 2, or 3) when selected. Can I do it like this or do I have to restructure?

Thanks in advance...

Share this post


Link to post
Share on other sites

Ken

When you make your value list, chose the ID field first and then click into the spot that display the second field and then chose full name field. Value lists enter the value from the first field but only displayed the values in the second field.

Hope this helps.

Lionel

Share this post


Link to post
Share on other sites

That's exactly the behavior I'm looking for, but I don't see how to do what you suggest. I'm using FMP 7.0v3. Is that a newer feature or am I misunderstanding the dialog box?

Thanks.

Share this post


Link to post
Share on other sites

Yeah, thats 8+...

But you could always set your valuelist to be sourced from your name field and then have that same field auto enter the id that's related to the name...

Share this post


Link to post
Share on other sites

Yeah, thats 8+...

But you could always set your valuelist to be sourced from your name field and then have that same field auto enter the id that's related to the name...

This is what I was trying to set up, but I could not figure out how to do it. I already have the value list sourced from the name field. How do I get it to auto enter the ID? This is unclear to me.

Thanks.

Share this post


Link to post
Share on other sites

Hi Ken,

(hope that's your name lol).

See the attached file.

example.zip

Share this post


Link to post
Share on other sites

Ken

I have never use vesion 7 but this could be done in Filemaker 6. So I do not see why FM would remove it from a update version.

Lionel

Share this post


Link to post
Share on other sites

When you make your value list, chose the ID field first and then click into the spot that display the second field and then chose full name field. Value lists enter the value from the first field but only displayed the values in the second field.

The bold is new to FM 8.

Share this post


Link to post
Share on other sites

From my understanding Ken want to displayed the person full name and the person ID number. This can be done in FM 6 so I think Version 7 would do it also. The person ID number would be the first field in the value list and the person full name would be the second field. When you chose the record you want then the user ID is entered and not the person full name.

Genx

When I said only displayed the second field I did not mean in the field but only in the value list.

Sorry about the confusion.

Lionel

Edited by Guest

Share this post


Link to post
Share on other sites

displays values from the user name value list, but which enters the user_ID when selected

Don't think he want's the id displayed during selection but meh.

Share this post


Link to post
Share on other sites

Okay, I figured out what you were suggesting. I can't believe I never used a value list this way before! Anyhow, I can live with both the ID and full name being displayed in the value list, so this works for me now.

Now the problem is that I don't want to have the ID be what is displayed to the user once it is entered. I only want to show the name field, even though I am entering a user ID into a "CreatedBy" field.

BTW-Thanks for the example file. It was much simpler than I was trying to make it!

Share this post


Link to post
Share on other sites

Oh right, for your second problem, just set your field to auto enter, replace existing values:

Case( Priority = "High" ; 1 ; Priority = "Medium" ; 2 ; Priority = "Low" ; 3 )

Share this post


Link to post
Share on other sites

Hmmm, well this is a technique I've only recently picked up -- known as the "hidden field".

It looks like there's one field, but there's actually two. Take a look at the field behaviours and where each field is sourced from to work it out.

example.zip

Share this post


Link to post
Share on other sites

Very cool technique. It's so simple too! Thanks to all who helped. I have both of my issues solved now...

Ken

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.