Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HI I have two files a contacts f 1

Status
Not open for further replies.

simoncpage

Programmer
Apr 4, 2002
256
0
0
GB
HI

I have two files a contacts file and a company files. I am trying to query from the company file a name "Simon" for example but because it is working relationally it is returning name of people in a company where there is also someone called "Simon". The only way to get round this is to query in the contact file but then this is just messy navigation wise. Is there anyway round this or can I set up links from one layout to another layout in a different but related layout?

Any help would be great!!!!

Thanks

Simon
 
after u querry the file u can use a script"Go to layout:_____" and send them to any layout u like.
the order can be reverse go to layout x --and then-->querry
All the best!

> need more info?
:: don't click HERE ::
 
Sorry no I would do that but I have two files which each contain a table which are related. How do I go to the layout on another file?
 
how ur doing your querry..portal?
u can create a Portal on one of those files and use this portal to display info from the other file....then perhaps u can use "Go to portal Row" to see a prticular record......again depends on your setup of "querry"...there might be even easier ways
write more about How ur querry and what is that u .....well...write a little summary about your project: what data you are storing and how these files are related....what do u need to find by this querry

my best guess is that you set up a poral 1st and then we can see about navigation...don't worry this is not too hard ;-)
All the best!

> need more info?
:: don't click HERE ::
 
Okay let me try and explain

I have 2 files 1 of contacts (contacts.fp5) and 1 of companies (company.fp5)

They are link by a contactID so you know which contact is at which company.

In the company.fp5 I can setup a portal showing multiple contacts for each company. But what I want to do is to be able to click on an indiviual contact and go to a page with the detail on. But instead because of the relationship when I display this it just shows me the first name connected to the company and not the indivual. (the same thing happens if I query the name "Simon" I get a list of all the first people connected to a company that contain a "Simon" in them). I realise that if I go to the contact.fp5 file and do the same search I get a list of all "Simon" individuals. SO the problem is how to get from the company file click on a contact in the portal and go to the contact file and display all the details for that contact or can I do this from the company.fp5 file and if so how?

Any help would be very useful.
 
Thats great!! I see go to related record perfect just the function I was looking for. Thanks a lot saved me a lot of work on the work around I had planned using open file.

Thanks
 
Great!
I am glad it worked out.......see I told u u can do it ;-)
All the best!

> need more info?
:: don't click HERE ::
 
Is there away to tell it go to a certain layout in the contact.fp5 file rather than the active one?
 
1.) Open File Contacts and make a simple script:
_______________________________
"Go to Layout: -whatever-"
_______________________________

2.) then open file Company and make a 2 step script(call it "something"):
_____________________________________________________
"Go to Related Record:'RelationshipName'"
"Perform Script[Sub-Script:Extrenal :Contacts.fp5]"
______________________________________________________
--select the sript u made in step 1

Now your file Company has a 2 step script that u can assing(Perform Script "something") to that Go to Related Button in portal...
All the best!

> need more info?
:: don't click HERE ::
 
same link updated!

> need more info?
:: don't click HERE ::
 
STAR STAR STAR! thanks alot!

1 more thing. Don't suppose you have an example of a many to many relationship - where a number of contact can be in more than one company and vice versa?

Thanks again!
 
link updated....it is one of the ways
All the best!

> need more info?
:: don't click HERE ::
 
Sorry Im not sure I get this. You have added radio buttons (which I changed to checkboxes) on the first contacts layout but selecting so that there are more than one company selected for Kelly for instance they dont show on the company listing. It works only for single companies?

Have I missed something obvious?!

Basicaly how can I do it so that Kelly is related to all companies?

Simon
 
oops long days....
try the link now, 3 files, related
---the only thing left is validation of duplicate records and making sure that user does not Assign the same Contact to the same Company ....in the mean time take a look at the files above....I will keep u posted.....
I hope u learn something from all this... :) I did!
All the best!

> need more info?
:: don't click HERE ::
 
Arhhh I see now! Yes have learnt a lot BIG thanks....duplication is my next step now I have many - to - many figured out.

I wrote a previous post about a whether as you are entering a new contact you could run a search. Is there anyway of capturing the input of a field to run a script? I found quite a nice deduplication file on fmforum.com under the sample files but this requires you to enter all the details and then click on a button to run a search to see it the contact is already present which isn't the most ideal although I guess it works...do you have any ideas on this?

Thanks again! You deserve another couple of stars!
 
hello there!
Actually, I have started a thread for you
I am not quite sure how to finish the validation process in this case.....but I am sure it will not require Entire entry asu have found it in sample files....
u can turn any field into a button and then assing that button a script...so it will look like the user just "clicked" on the field while in reality it will run a comparison script.
I think if u look at the "JOIN" (lineItem) file u will see that I tried to 'validate by calculation' Contact_ID and/or Company_ID but no luck yet.
few more crubms of bread and your are almost home :)
All the best!


> need more info?
:: don't click HERE ::
 
Back on to the many-to-many relational example. Is there a better way that you can think of of adding a person to a company than having the drop down list of companies in database (since if there are 1000's then this is quite tedious?)

Thanks

Simon
 
hm....not that I know of.....
notice that u can navigate the drop-list based on the values in it.
eg.
for the companyID=Comp00002
u would just "drop the list" and then press number 2 to "jump to" that compnay.....not much help but....a thought.
All the best!

> need more info?
:: don't click HERE ::
 
I having a go at setting up a global info and then moving in the details...

Im also not sire about this whole join approach as it duplicates entries rather than having one entry with a multikey approach - dont suppose you know how to do that???

Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top