July 26, 201213 yr 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
July 27, 201213 yr 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?
July 27, 201213 yr Author 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.
July 27, 201213 yr Author 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!
July 30, 201213 yr 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.
December 4, 201312 yr 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
July 21, 20169 yr Fred -- Thank you for the hint on "Show vertical scroll bar" -- solved a problem I was working on for hours!!
May 10, 20196 yr Newbies On 12/4/2013 at 10:47 PM, FredBloggs said: name your portal and use : how to name portal?
Create an account or sign in to comment