Nestor Posted August 24, 2009 Posted August 24, 2009 HI, I have 2 tables, Work order table Designs Table I have a portal showing my records from my designs table. I have a field (in my work order), that will be used for users to put a number. Lets say that users put in a 5 in the field. I want my script to create 5 records in my portal (left side of the jpeg). what can i use in my script that can create 5 new records? Thanks
JesseSFR Posted August 24, 2009 Posted August 24, 2009 I would write a script that took a number as a parameter. The script would then go to a layout whose table occurrence is your design table and loop to create the records. Heres some psuedo code: Go To Layout[Design] set variable[$counter; 1] loop exit loop[$counter > get(scriptparameter)] new record set variable[$counter;$counter + 1] end loop You could then put a button on the layout to execute the script and have the field that the user is editing data be the parameter. You could do this with script triggers as well but I don't know if you want to do that
Nestor Posted August 24, 2009 Author Posted August 24, 2009 Hi Jesse, I tried creating the script, but its not working for me. can you look at my db and check the script, maybe you can point me in the right direction. Thanks. You were right on target with the idea. (want to call up a number and have my script create that amount of new records) I would write a script that took a number as a parameter. The script would then go to a layout whose table occurrence is your design table and loop to create the records. Heres some psuedo code: Go To Layout[Design] set variable[$counter; 1] loop exit loop[$counter > get(scriptparameter)] new record set variable[$counter;$counter + 1] end loop You could then put a button on the layout to execute the script and have the field that the user is editing data be the parameter. You could do this with script triggers as well but I don't know if you want to do that WO.zip
JesseSFR Posted August 24, 2009 Posted August 24, 2009 Alrighty, I have made some changes. I took out the script parameter and added two variables. One to keep the id of the work order and one to keep the total number of records to create. Here's the file. WO.fp7.zip
Søren Dyhr Posted August 25, 2009 Posted August 25, 2009 I have a field (in my work order), that will be used for users to put a number. Lets say that users put in a 5 in the field. I want my script to create 5 records in my portal (left side of the jpeg). what can i use in my script that can create 5 new records? You're hopefully aware this way of asking in abstractions, might give a solution fitting the abstraction only - there must be a context and purpose as well to question the way you arrived to the abstraction, what if the abstraction you arrived to is based completely on inadequate premises. Imagine putting a door back on hinges, here isn't the more the merrier that works. If two persons attempt to co-operate the hinge business, will both make the adjustments to any imbalances occurring ...and if both are with their instincts/senses, is the compensation twice of whats actually required, because both makes the adjustments. ...or Goodharts Law: that any observed statistical regularity will tend to collapse once pressure is placed upon it for control purposes However when things are so loosely defined could the same thing be achieved this way: --sd WO_sd.zip
Recommended Posts
This topic is 5570 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