geraldh Posted July 26, 2012 Posted July 26, 2012 Hello, This has got to be simple, and I'm embarassed to ask this; but can't figure this out. I want to create a script to create a new portal row/record. I've tried Go to Object ; but that seems to just go the portal field that I named. From there I tried Create New Record, but that just creates a new Record in the contextual table. Please any help will be much appreciated. Thank you
comment Posted July 27, 2012 Posted July 27, 2012 I believe it's best to place the current parent's ID in a variable, go to a layout of the child table, create a new record and set its foreign key field with the variable. From where will come the rest of the data for this record - assuming you don't want to create just an empty record? 1
geraldh Posted July 27, 2012 Author Posted July 27, 2012 Comment, Thank you for your reply. I have considered that route; however, for my users because they are looking at populating an Estimate or Invoice, with several EstimateLines; I wanted to find a way that they are working from the actual Estimate/Invoice layout, as they will probably add several lines. The data will be inputted following the methods (a "Select Window") described by Fenton in this post (a post which I think you might have recommended to others). http://fmforums.com/...ment-something/ I will experiment with creating a simiar Estimate/Invoice layout but in the context of the EstimateLine table. Or perhaps experiment with a script that will do all that work underneath...? Thank you again. If you have any other thoughts, please let me know.
geraldh Posted July 27, 2012 Author Posted July 27, 2012 I have successfully got the script to get the various variables, back and forth between the Estimate and EstimateLine layouts, populating the fields they should be populating. I think I'm going to go ahead with this unless anyone can warn me of something I don't know!
comment Posted July 30, 2012 Posted July 30, 2012 If I understand correctly, your script needs to: 1. Get the parent EstimateID into a variable; 2. Present the user a choice of items (in another window, if you prefer); 3. Get the selected ItemID into another variable; 4. Go to a layout of LineItems, create a new record and populate the two foreign key fields with the variables.
FredBloggs Posted December 4, 2013 Posted December 4, 2013 I want to create a script to create a new portal row/record. I've tried Go to Object ; but that seems to just go the portal field that I named. From there I tried Create New Record, but that just creates a new Record in the contextual table. I know this thread's a bit old now, but it may help others as I know it took a while for me to get this as I wanted That was the right start… name your portal and use : Go To Object ["MyPortalName"] Then… Go To Portal Row [Last] making sure that "allow creation of records" is checked in your relationship description. You can then : Set Field["MyPortalField"], and the record will be created. You only need to show one portal row, if that suits you BUT… … make sure that "Show vertical scroll bar" is checked in your portal options, or else it doesn't work properly. That last "gotcha" took me ages to pin down 1
Amazin1 Posted July 21, 2016 Posted July 21, 2016 Fred -- Thank you for the hint on "Show vertical scroll bar" -- solved a problem I was working on for hours!!
Newbies Violet Posted May 10, 2019 Newbies Posted May 10, 2019 On 12/4/2013 at 10:47 PM, FredBloggs said: name your portal and use : how to name portal?
Recommended Posts
This topic is 2023 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