Jump to content

Value list behavior kind of needed, but with twist


J__

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

Recommended Posts

Hi,

Suppose you have say a list of purchases in a table called [purchases]

I have a field in there for customerName and customerPhone and so on.

I'd like to go to a contacts screen - which has a contacts table. Pick a contact from the table - say in find mode and then set that values from contacts in the [purchase] tables contact fields. If you use a value list with a drop down, then this is easy.

the thing is my contacts list may be so big (say 100 or more) that the drop down would be cumbersome to manage. Also Im not relating the producs with contacts because I only want to copy the information - not have a link to it.

Is there a way to do this with value lists?

I tried just writing the id from the contact and name to the products record, but it just doesn't work (or I'm not doing it right[likely]). I also looked in a few books and looked at samples from filemaker, but couldn't find one that does this.

I thougth I would try this group to see if there's a nifty technique to doing this with value/conditional lists.

if you have a resource to refer me to please point me there, or give me the tip.

thanks for your help in advance,

Link to comment
Share on other sites

Hi, J, if i read you right, it sounds like you may be better off with a portal.

Let's say you have a relationship from Customer::CustomerName to Purchases::CustomerName. If you have a layout that gets its data from the Customer TO, put a portal on it that gets data from the Purchases TO. Whenever you change the value of Customer::CustomerName, the corresponding records from the Purchases TO will show up in that portal.

You're better off using CustomerID as the key in this relationship for several reasons, but we can get into that once you get this working (if it is indeed what you are looking for).

J

Link to comment
Share on other sites

Hi QuinTech,

thanks for the response.

Here's the behavior I'm trying to acheive:

1. There's a products form

2. a few fields are contact related. contact_name, contact_phone.

3. there's a button to the right of the contact_name.

4. user clicks the button.

5. jumpst to another layout - where the user can do a find

6. once they find > 1 record, I take them to a listview.

7. The user then picks the contact they want.

8. I take them back to the products form

9. now the contact_name field is populated with teh name I chose in the Contacts screen - and so is the phone.

I don't want use a portal for this because I don't have the room on the layout and I'm not relating my product table to a contact table. What I'm doing is copying a few of the fields.

I have a background with other databases and I'm trying to do it the 'filemaker' way... without a portal!

thanks for any help and suggestions you can give.

sincerely,

J__

Link to comment
Share on other sites

The contacts can be put in a value list for the current table, based on a field from the other table (the contact table). If 100 contact choices are too many, you could divide the list into smaller lists, and just popup the appropriate list for the particular user.

Link to comment
Share on other sites

Hi, J. Just to clarify -- when you jump from 4 to 5, is there some connection? That is, when the user jumps to a new layout, is that layout determined by the selected name? Or is the found set you display in that layout determined by the current name? I will assume the latter, otherwise steps 1 thru 4 are red herrings.

I think the issues you raised should not be issues for you. You can always resize different things (including a portal) based on your needs -- and if you can't include necessary functions because of space limitations, you're better off moving some fields to different layouts than trying to come up with a difficult workaround. And evene if there is no significant relationship between contacts and products, you can always do a universal join (so that ll products match all contacts at all times) if you're looking to associate a product with a contact on the fly.

I have a background with other databases and I'm trying to do it the 'filemaker' way... without a portal!

Urr? Nothing wrong with portals from a Filemaker perspective, for sure!

J

Link to comment
Share on other sites

Hi QuinTech

(and thanks to transpower also)

Basically, I have an edit field, which I want to populate with a contacts name.

I wanted to click a button and jump to a layout where the user could then enter find criteria.

Click search or enter and then see a list view of all matches. Once they pick an item in the list view, have it jump back to the first layout and place the contact name in the edit field.

I figured out how to do it! As you'll probably suggest (you guys are so smart!)

i could use a global variable in the contacts table and then when i jump back to my layout (i have a script which takes me back) copy that global contact information into the first layouts contact field.

Seems to work.

but if you have a better suggestion - I'm all ears.

also, I hope I didn't sound down on portals - i use them, but I didn't want to use it this time.

thanks so much,

J__

Link to comment
Share on other sites

That sounds like a good plan to me. One minor point/modification:

copy that global contact information into the first layouts contact field

Maybe you already are, but i would use a Set Field rather than Copy. Copy messes with the user's clipboard, and my personal preference (and that of a lot of other developers) is to keep everything self-contained within FM. Once you introduce the clipboard into it, things can start to go wrong.

But that's a very minor point.

J

Link to comment
Share on other sites

This topic is 7210 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.