r.m.c Posted November 28, 2001 Posted November 28, 2001 Right on in... Company.fp5 and Pubication.fp5 One company has more than one publication and related through company name. I want to have a layout in Company.fp5 that allows a user to choose which publication they want to edit from a list of all publications. (So far this I can do Value list of publication_names is created from all publication records through related field.) What I needs is a way of scripting a button to send the user to the appropriare record within company.fp5. ie. The user may only know the publication name and not the name of the company it is associated with. So I want to give them a way to choose the publication they are wanting to look at and then send them to the appropriate company record and layout where editing of publication info is allowed. I do not want to send them to the publication.fp5 file. All editing is done within the company.fp5 file and their appropriate layouts. I think what I want to do makes sense....? SOLUTIONS I have tried. A self-join within company.fp5 based on publications..and a script with a goto related record command. I am just shooting in the dark with this concept, I just feel it should work but haven't done any proper groundwork. I also think a goto related file within publication and then back again using company name might work, but then how do I choose which related publication I want to goto, since my company database is related to uh well company? Okay now I am definitely just babbling Richard Any and all help appreciated.
The Bridge Posted November 28, 2001 Posted November 28, 2001 You can find parent records for children by performing a find within a related field inside the parent database. In this case, you could put, say, Company_Publications: Publication_Name on a layout in your Company.fp5 file, with a drop-down menu or list showing all values from Publication_Name in Publication.fp5. Go into Find mode, select the publication name, Perform Find, and it should find the company without ever leaving Company.fp5 [ November 27, 2001: Message edited by: The Bridge ]
r.m.c Posted November 28, 2001 Author Posted November 28, 2001 This is a list of the difficulties I encountered and how I solved them towards a working solution. Problem #1. If one doesn't find mode first a user can easily change the 'publication name' in the relation which is associated with the company name. So if the field of 'company_publications: ublication_name' has a value list of all the publications names and one changes it in 'BROWSE' mode then the actual publication name associated with that company_publication will also change. Solution #1 Create a global field that houses the value list of all the publications and allow the user to only change this value. Problem #2 Once a user enters find mode the global field with the publication_name value list does not become chooseable *something about the relation in find mode does not exist* Solution #2 A script ( I attached to a button) is created for a separate layout. I called it "Find company layout". The user chooses which publication name they want to find (Which is a global field with a value list based on all the publication names from the publication_name file.) Then the script does the following. - Enter Find Mode[] - /* no parameters because we are gonna set em and we must do this first so we don't change any company<->publication_name fields*/ -Set Field ["Publication: ublication_Name","gPublication_Name"] /*Publication: is a relation between company_publications and publication_name based on company-name and gPublication_Name is a global field within Company_publications*/ - Perform Find[] /* It is important not to set 'restore find requests' set otherwise the set field option we just did will be overritten - at least this happenned to me */ - Go to Layout ["Company Layout"] /* Go to the layout that you wanted the user to enter in the company and publication data into */ -Show all Records /* This prevents the user from getting confused by where did all the other records go?*/ Hope this was helpful to someone...don't hesitate to pick this apart and explain it to me Thankyou one and all for every question that is answered on this message board. A few people have helped so many. Kudo's to everyone who helps. Richard
The Bridge Posted November 28, 2001 Posted November 28, 2001 quote: Originally posted by r.m.c: This is a list of the difficulties I encountered and how I solved them towards a working solution. I'm glad to hear that -- I typed my reply rather hastily and left out a few caveats. I'm gratified that you were able to figure out the rest yourself.
Recommended Posts
This topic is 8465 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