August 30, 200619 yr As subject. Is there a way to create a new record on a table? I have a file called the PC Asset Management.fm7 which has two tables: Asset and Inventory. There is layout called Inventory View that is based on Tabe: Inventory. OK, here is the trciky part, another file called Peripheral Management.fm7 and I am trying to write a script to copy field(s) from Peripheral Management.fm7 to PC Asset Management.fm7 that is(are) in Inventory. Problem: ======== It seems that I am unable to write a script on Peripheral Management.fm7 as ****************************************** Go to Layout ["Inventory View"(Inventory)] New Record/Request ****************************************** So I checked the discussion about "copy & paste" on http://fmforums.com/forum/showtopic.php?tid/179607/ And tried the following script: Copy Peripheral.field(s) to gField(s) ?:)?:)?:????????????? Go to Layout ["Inventory View"(Inventory)] on PC Asset Management.fm7 New Record/Request ??????????????????? Paste gField(s) into Inventory.field(s) Commit Records/Requests Copy Inventory Number to gInvNo Go to Layout ["Peripheral View"(Peripheral Management)] Paste gInvNo into Peripheral.field Commit Records/Requests As you can see the two lines between ?? Any suggestion to go to the Layout and add a new record in order to get the Max(Inventory Number)?
August 31, 200619 yr If I understand you correctly, you want to run a script in the file "Peripheral Management" that creates a new record in the file "PC Asset Management." The Peripheral file should have the following: - a file reference to PC Asset - a table occurrence (TO) based on that file ref - a layout based on that TO This should enable you to go to the layout and create a new record etc. in your script. PS: I hope that you are using the Set Field script step rather than copy and paste.
August 31, 200619 yr - a layout based on that TO Not nessersary the last of your branches, if you have a multicriteria relation with "allow creatio...." turned on, could you via a script just write a dummy value. Then are all the fields you need to copy over criterias for the relation except for the dummy field a relation away. --sd
Create an account or sign in to comment