ianmuir Posted April 6, 2012 Posted April 6, 2012 Hi, is it possible to have 2 tables in one layout, one showing table view and one form view? Thanks
Lee Smith Posted April 6, 2012 Posted April 6, 2012 Hi Ian, and welcome to the forums, Short answer to your question is yes. You can create many layouts for a table. It's normal to create a layout for each view, and it is common to have multiple layouts for a particular view such as the form. Read about creating layouts and fields etc. in your user's manual. Lee``
michael3785 Posted April 6, 2012 Posted April 6, 2012 Hi Ian The way that Filemaker is put together does not support this in any simple way but there are less simple ways that you can use if the use case fits. A layout will always be achored to a table occurance in your graph so when you place fields on the layout you are placing fields from that TO or from related TOs. Now if you want to show another whole set of records, you are going to need to use a portal. However this is going to show you related records to your base TO. You don't independant access to another table altogether. There arte something syou can do to pretend like you do have an independant second table though. The thing I do in these cases, is have a "cartesian" (i.e. "match all records") relationship to another table. This is the X relationship comparator in the graph. You can use any indexed field you like on either side of the relationship, but I like to use key fields as I know they will never be calculated or anything unsuitable. So now you have a relationship from you base TO to all records in the second table. You can now create a portal to that related TO that will show you all records in that second table. If you want to control the found set in the portal in a way that is essentially nothing to do with teh base TO (which btw I am assuming is your form part of the layout), then there are 2 ways to do this, 2 variations on the same theme. First you need to create script to make a list of all the keys in the second table for the records you want to show. Finds on indexed fields in FM are quick so pop a window off screen find the records you want, freeze window and loop through to get your list of keys. Sounds clumsy but its pretty quick with a relatively small data set. Now come your options. 1. filter the portal based on the key field in the record being present in your list (use patterncount for this), OR your key list being empty (in which case you probably want to show everything). If the key is found in your list, the record will appear, otherwise not. or, 2 create a global field in your basse table and put the key value list in there, then change your relationship from cartesian to one where you match the key on the second TO with the global in your base TO. 1 is potentially slower as filtered portals load all the related data befdore they filter it. 2. performs quicker but requires you to add stuff to the schema and also means that unless you generate a key list and put something in your global you will not see anything at all in the portal. There are various other techniques around this script triggers on "find" fields, sorting, etc, but this is a general approach to get you going. It is not trivial but it may well get you where you want to go. M
ianmuir Posted April 7, 2012 Author Posted April 7, 2012 Hi, many thanks. I dont want to use a portal. I need 2 tables in one layout, 1 in table view and 1 in form view. I still cannot make this work. Ian
IdealData Posted April 7, 2012 Posted April 7, 2012 Why not open a new window and switch to the opposing view style in the new window.
bruceR Posted April 7, 2012 Posted April 7, 2012 Hi, many thanks. I dont want to use a portal. I need 2 tables in one layout, 1 in table view and 1 in form view. I still cannot make this work. Ian As mentioned before - that is correct. You cannot make this work. But what is the scenario here? Rather than wish for a technology that doesn't exist - what is the problem? What is the user trying to do?
ianmuir Posted April 9, 2012 Author Posted April 9, 2012 Hi, I have made a TO of the main table. I have made a layout to show the fields in the TO. If I do a find in the TO it works and shows the found set which is different to the layout showning the main tables records. This is what I want. If I put a portal on the main tables layout and tell it to show records from the TO it does not show the found set of the TO and only shows 1 portal row. I need to see all the found set records from the TO in the portal. Does this make sense? Ian
Lee Smith Posted April 9, 2012 Posted April 9, 2012 It sounds like you're speaking about the Go To Related Records script step. If so, you set up what to show in the dialog box for that script step. If you are talking about something else, please let me know. Lee
ianmuir Posted April 9, 2012 Author Posted April 9, 2012 Thanks Lee, can you give ma an example of how to do this? Ian
Lee Smith Posted April 9, 2012 Posted April 9, 2012 Start with reading the User Manual and the Help on Go To Related Records http://Vhttp://www.filemaker.com/11help/html/scripts_ref1.36.20.html this link is the same as the online help in FileMaker when it is open. Also, attach a file to your post and it makes easier for us and you to see what you are wanting. Lee
Recommended Posts
This topic is 4610 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