kiwiora Posted October 14, 2002 Posted October 14, 2002 Hi, First forgive me, I'm a bit of a newbie to Filemaker Pro. However I would appreciate some guidance with the following conundrum. I am creating a leasing package for a law firm. At the top of the data entry screen are buttons for each shopping centre. These are grouped in client groups. e.g ABC Corporation has 123 Shopping Centre, 456 Shopping Centre and 789 Shopping Centre. When you click on one of the buttons the information for that shopping centre is entered automatically into the appropriate fields using a script. Because we're busy little vegemites, I now have some 30 shopping centres I need to have buttons for and as you can imagine it is starting to look quite messy and busy. So the question is: If I were to use a drop down menu for each Corporation (obviously the shopping centres would be the drop down). I would use an if statement in the script following selection to complete rest of script of address etc details. Problem is I would need to lock down the other menus for the Corporations as obviously they can't choose more than one shopping Centre let alone one corporation in each record. I have seen a similar script already which, once selected, will not allow the user to amend. Which I guess I can utilise. Or, alternatively are there any other methods you can think of? It needs to be easily read and clean to the eye (they are lawyers after all utilising it). I am going to attempt to upload a view of the database. Names have been altered to protect the guilty. Cheers
CobaltSky Posted October 14, 2002 Posted October 14, 2002 From what you've said, you'd be much better off using a relational structure to achieve the effect you're looking for, rather than having scripts copying data around. How this would work is that you would create a separate file which has all the shopping centre details in it, with each shopping centre on a separate record (with a field which identifies which corporation they belong to). Your main file would then require two global fields - one for corporation and another for shopping centre, plus two relationships - one which matches the global field for corporations to the corporations field in the shopping centre file, and another which matches the global field for shopping centres to the shopping centre field in the shopping centre file. In the main file you would then have a value list which was defined to show all the corporations from the shopping centre file, and a second value list which picked up values from the shopping centre field in the shopping centre file based on the corporations relationship to the shopping centre file. On your layout, you are then able to attach the first value list (corportations) to the corporations global field. If you place the second (shopping centre) global field in the layout with a value list attached and format it as a radio button field, then whenever you select a corporation, the shopping centre field will update to show which shopping centres are available (ie belong to that corporation). Finally, you would populate the layout with fields from the shopping centre file, taken via the shopping centre relationship to that file. Then when a value in both the corporations and shipping centres global fields has been selected, the corresponding shopping centre information will automatically be displayed on the layout. This approach uses the relational data system which is the basis of FileMaker Pro, and works without any data having to be copied to anywhere, and without a single script.
kiwiora Posted October 15, 2002 Author Posted October 15, 2002 Fabulous thanks for that. I would have to have ended up doing the "Shopping Centre" database anyway in the future to keep track so that has just given me more motivation and as of this afternoon it's all complete except for the following problems: REFRESH: Not a big issue as of course they should all be creating a new record, but lets say they have chosen ABC Corporation and 123 Shopping Centre. UHOH they've made a mistake so have gone back to change ABC Corporation to DEF Corp. I notice 123 Shopping Centre remains sitting there (although the drop down does give them the appropriate shopping centres for the DEF Corp). Is there a way of clearing this back to blank atleast. I know it's a seemingly stupid thing, and they should change the centre when they change the Corp, but we are talking lawyers here . One real issue that has arisen however is the following example. I haven't populated the the layout so perhaps the answer would have sprung up at me... Background infromation to anyone who doesn't know titles, (or specifically QLD, Aus) each property has a land description which would look something like ... Lot 1 on Crown Plan RP 2345 in the County of ABC in the Parish of DEF Known as Title Reference 6789. Now you can have a massive shopping centre where the centre can span over several lots so dependant on where the shop is located in the centre, can dictate which lot description you use. CASE EXAMPLE: 123 Centre is a big shopping centre and in fact sits on two land titles (i.e Lot 1 on RP 12345 or Lot 2 on RP 12345) . In the old days my script would pause and ask what lot number (i.e 1 or 2) and dependant on the outcome would automatically complete the record (and land title information) accordingly. So now in the Shopping Centre there are two records for 123 Centre - 1) is Lot 1 etc etc and 2) is Lot 2 Both records are exactly the same bar the title info. 1) is this the best way to deal with it,, how better to identify that some shopping centres sit over more than 1 title. 2) when chosing the centre in the main file, have an if statement that if the shopping centre = 123 Centre, then pause and ask what lot, which record??? Apologies for big long-winded but atleast with more information you can cut the stuff out you don't want as opposed to being lost as to what I mean. Cheers
CobaltSky Posted October 15, 2002 Posted October 15, 2002 First of all, the refresh problem. I take it that corporation is entered via a pop-up list. If so, you could consider turning off "Allow Entry into field" for that field, creating ascript which clears the shopping centre field then goes to the corporation field, and then attaching the script to the corporation field. That way, when a user clicks the field, instead of popping the field, it will run the script, which will clear the shopping centre field then pop-the field. As regards, your lot number problem, I suggest that you create a field for lot no, a value liet for lot number (which is conditional, based on the shopping centre relationship) plus an additional relationship to your shopping centres file based on new calculating fields which concatenate shopping centre and lot number in both files. You could then place the lot no field as a radio button field at the top of the layout next to your cordporations and shopping centres pop-up fields. It will remain blank unless the corporation and shopping centre chosen have lot numbers entered in the related file (you could base it on a field which is only populated when there is more than one lot number for a given shopping centre, if you wish) Then for a shopping centre that has only one lot number, a value in corporation and shopping centre should suffice to trigger the display of related data, however for those that have lot numbers in the lot number field, a third choice (ie a lot number in the readio buttons field) will be required before the corresponding shopping centre data will appear. Does that help?
kiwiora Posted October 15, 2002 Author Posted October 15, 2002 That's great. The refresh problem has fixed a beauty. But I have just discovered one almighty flaw in all my hard work (and it's a biggun). I have stuffed up somewhere along the line and when you choose a corporation/shopping centre it changes it to that corporation etc in every record... sigh, i'm fast getting over making this super duper and going back to a million buttons and telling them to get over it.. but i like a challenge and learning new skills so I guess I will mosey on. I've got a funny feeling that perhaps I should change it to lookup throughout??? Thanks for all your help, If you ever get to Brissy I'll have to shout you a drink! (or four) As for the rest of the lot number problem, it's already in a field on its own, so I will settle down and work through your solution thanks so much. Kind regards
CobaltSky Posted October 16, 2002 Posted October 16, 2002 The reason it would be changing on every record would be because the field is global. Make it a standard text field and things will look a lot different. But bear in mind that the separate records for each shopping centre sit in the other (related) file, so adding new ones should be done there (even if from a user perspective, it is done via a script from your main file...). Thanks for the virtual Ales - most refreshing! Cheers,
kiwiora Posted October 18, 2002 Author Posted October 18, 2002 DOH don't you hate it when you can't see the hills for the trees. Meanwhile I have been working through your solution re my lot problem and have become somewhat stuck. I think I understand what I"m doing, I just can't get the blimmen thing to work. So to re-cap we have the 123 Centre which has 2 titles - Lot 1 and Lot 2. I created a value list called 123LotNo and entered in the two values (namely Lot 1, Lot 2). I changed LotNo to calculation as follows: If ( ShoppingCentre = "123 Centre", ValueListItems ( ShoppingCentreRegister , 123LotNo ) )If ( ShoppingCentre = "456 Centre", ValueListItems ( ShoppingCentreRegister , 456LotNo ) ) and so on and so on which has come from ValueListItems ( dbname , valuelist ) I think i'm going wrong with dbname??? have tried full name of database (incl and excl of .fp5) ShoppingCentreRegister.fp5 have tried removing it all together... I feel so close and yet so far....
Vaughan Posted October 18, 2002 Posted October 18, 2002 If on a PC, the "real" file name may actually be in uppercase. To solve this problem, instead of typing the file name by hand use the "Status(CurrentFileName)" function.
kiwiora Posted October 18, 2002 Author Posted October 18, 2002 Wahoooo If( ShoppingCentre = "123 Centre" , ValueListItems( Status(CurrentFileName) , 123LotNo ) , "" ) Works great, cept it thinks 123LotNo is a field and not the value list. Comes up with "this field cannot be found"
CobaltSky Posted October 18, 2002 Posted October 18, 2002 You'll need to put quotes around the value list name, as you are specifying it as literal text. FMP interprets everything which isn't in quotes as either a function or a fieldname.
Recommended Posts
This topic is 8076 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