Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7467 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Hello all. I'm sort of new to FM (used it quite a bit a long time ago). I'm working with FM 7 on a project and want to use a popup to select a value from a foreign table to assign an FK value in the current table. I can get this to work but not cleanly.

The example would be say you have two tables, Company which has basic information about a company and a unique key value of type number and a name of type text. The second table is called Contacts with a primary key value as well, a contact name, and an FK (foreign key) value to store the Company key value.

Now, I have a popup that allows the selection of a company which currently displays the company key along with the company name when selected. What I need to do is not display just the company name, but yet set the company FK value in the contacts table when the user selected a company from the popup.

So far, I have not been able to do this. The best I have been able to do is have the popup display the company key (what I would rather never show to the user) and then a second display field that links to the related company name field. Is there any way to set the contacts FK field via a popup that displays the list of company names stored in the company table without ever showing the company key value?

For those familiar with Access, this is done by flagging the key value in the popup as being invisible. Something like this would be perfect.

Thanks much,

Mark

Posted

Take a look at this post I make a few days ago.

http://www.fmforums.com/threads/showflat.php?Cat=0&Board=UBB18&Number=109852&Forum=All_Forums&Words=&Searchpage=0&Limit=25&Main=109852&Search=true&where=bodysub&Name=8153&daterange=1&newerval=&newertype=&olderval=&oldertype=&bodyprev=#Post109852

This is about as close as I've been able to get to an Access-style drop down list. (I'll take FileMaker over Access 99 times in 100. But I gotta say, I like the way Access does drop downs much better.)

Taking a cue from your post, I tried to make the key come up as invisible using the new TextColors() function to set the key portion as the same color as the background. But it doesn't work.

Hope this helps,

Dan

  • Newbies
Posted

Thanks much for your response! I would agree about the Access vs. FileMaker thing.

I will try your post on your solution to this issue but it would be much better to have an ideal solution to this. Something that FM should just have but now I'm thinking (due to the fact that FM is so close to what I want for a RAD environment) that I might start looking into the ability to write plugins to FM to facilitate this. I kinda browsed around and have not found much information on writing plugins for FM but I was sure you could do that. If you or anyone else have any links that could point me in the right direction for information about writing plugins for FM and I can get this working, I will post the built plugin back here for everyone else to use.

Thanks again,

Mark

Posted

There is some information on building plugins on the FM7 Developer installation CD. There are examples from New Mellenium and Troi. I only wish I knew C++ so I could write my own too.

Let us know if you write one that accomplishes this -- I'm sure everyone will be interested.

Dan

  • Newbies
Posted

Where are the "New Millennium" and "Troi" resources?

... and I sure will. Most of the work I have done in the past have been in C, C++ and ObjectiveC so as long as I find good examples and there are good hooks in FM to do this, I should be able to get it done.

Mark

This topic is 7467 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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