AnneES Posted February 16, 2006 Posted February 16, 2006 I have a portal which allows the creation of new records. The user enters some of the data in the portal (eg Name, Position). I use a go to related record script which opens another layout in a new window to allow the user to add the other details (eg address, phone etc). The problem is that the record in the new layout cannot be modified because it is being modified in the first window. This only happens when adding a new record - it works fine if I only want to modify an existing one. Is there a simple solution? I only just discovered the "open in new window" option and it looked like a good way to simplify the navigation for my users. I tried adding a "commit record" step before the gttr but it did not help. thanks for any help. Anne Skinner
comment Posted February 16, 2006 Posted February 16, 2006 Commit Records before GTRR seems to work for me.
LaRetta Posted February 16, 2006 Posted February 16, 2006 Since the cursor is in portal, might not focus be lost unless a pointer is made? ... wow, I SWEAR I sounded just like Soren!!! ^) But without capturing the portal row ID, a new layout window based upon straight GTRR will land the User on the first record (instead of the last newly created one)? It may not matter but then again it may? Or I may just be overdue for some sleep... :jester:
AnneES Posted February 16, 2006 Author Posted February 16, 2006 When I added the "commit records" step before gttr it certainly did open the new window with the first row of the portal rather than the one I had selected. I am using a self join relationship from the portal row to the related record in the new window. It does work fine for modifying records; I just wanted an easy way for users to add new records.
comment Posted February 16, 2006 Posted February 16, 2006 If I am not mistaken, Commit Records will commit the parent AND the children, no matter where you are - and you will not lose focus. Unless they've changed this in 8.02.
AnneES Posted February 16, 2006 Author Posted February 16, 2006 Thanks for your offer. I have not ever submitted a file...what should I submit and in what format? I am going to think about what I am doing wrong over the weekend. FMP is only part of my job and another part is calling me right now. I really appreciate all the help I get from this forum, whether from just browsing or posting questions. AS
comment Posted February 16, 2006 Posted February 16, 2006 A Filemaker file (zipped) demoing the problem.
Søren Dyhr Posted February 16, 2006 Posted February 16, 2006 If I am not mistaken, Commit Records will commit the parent AND the children, no matter where you are - and you will not lose focus. Unless they've changed this in 8.02. You are!! --sd testFocus.zip
comment Posted February 16, 2006 Posted February 16, 2006 Indeed I am!! I must have been even more tired than I thought, because not only did I make a mistake in my testing, I wouldn't have needed to test this at all - if only I'd stopped to think for a moment. Of course you lose focus! Aaargh! (... off to inflict some self-damage...)
Søren Dyhr Posted February 16, 2006 Posted February 16, 2006 (... off to inflict some self-damage...) You'd better! LaRetta and I won't tolerate, you take it out on your dog! Not even roasting! --sd
comment Posted February 16, 2006 Posted February 16, 2006 Ah, so it's "LaRetta and I" now? Oh well... I guess I'll have to go without dinner then.
Søren Dyhr Posted February 16, 2006 Posted February 16, 2006 Perhaps it would suit us better to come back on-topic again. The template I made contained a solution to the qustion raised. Set Variable [ $whatRow; Value:Get ( PortalRowNumber ) ] If [ IsEmpty ( PortalStuff::aValue ) ] Set Field [ PortalStuff::aValue; 1 ] Set Field [ PortalStuff::aValue; Case(0;0) ] End If Commit Records/Requests [ Skip data entry validation; No dialog ] Go to Related Record [ From table: “PortalStuff”; Using layout: “PortalStuff” (PortalStuff) ] [ New window ] Go to Record/Request/Page [ $whatRow ] [ No dialog ] Which will work as long the portal doeesn't observe a sort order. If the qustioners portal does could the principle be fledged further to constrain the found set with the recordID of the portalrow in question. --sd
comment Posted February 16, 2006 Posted February 16, 2006 How about: Commit Records/Requests Go to Portal Row [ Get ( ScriptParameter ) ] [ No dialog ] Go to Related Record [ From table: "Child"; Using layout: "Child" (Child) ] [ New window ] Using a script parameter, this will also work in v.7, and there's no restriction on portal sorting. I am not so sure about your If[ ] poster said some values are entered in the portal, BEFORE going to detail view. If I click the button in the last row accidentally, I'd be creating a record - I don't think I would want that.
Søren Dyhr Posted February 17, 2006 Posted February 17, 2006 The button that close the new window, could take care of null values and delete the record. Have you tried your last script suggestion? I think it bleeps at you, if you try to write something in the record. --sd
AnneES Posted February 20, 2006 Author Posted February 20, 2006 This solution has worked for me (well it did when I removed the sort order - which I didn't really need anyway). I do not have programming skills so this solution would have been way beyond me. Thanks again for your assistance. Anne
AnneES Posted February 21, 2006 Author Posted February 21, 2006 I am a librarian/records mgr/information systems officer for a small organisation in Sussex Street. I use FMP to manage legal case file tracking and a library catalogue amongst other things. I have visited this forum since I inherited some FMP dbases a few years ago and have read (and taken advice from) many of your posts.
abomb Posted May 24, 2006 Posted May 24, 2006 Could someone give some details on this topic. I am having the same problem in my database and can't seem to get it right. Receipt Inventory Have a receipt table that has a portal to Inventory which allows creation of records. It is an inventory database for my job shop. We receive all sorts of steel products that require different dimensions. Each item is tracked by 3 letters as the ID. exp. AAA,AAB,AAC,..., etc. For entry, receiving enters certain information along the portal, chooses the stock type, plate, angle, etc and then pushes a button right in the portal to open a small window that allows him to enter sizes. The script I have works great except for when I am creating a new record. Here is the script, If[inventory::Stock Type="Plate"] Go to Related Record[From table:"Inventory";Using Layout:"Plate Dimensions"(Inventory);New Window] Go to Field [inventory::Heat Code] Else if - same except for different items End if I can't figure out the a way to choose the correct portal row after I commit/record request. I also don't really understand how the script parameter works. Any help is greatly appreciated.
Recommended Posts
This topic is 6759 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