This topic is locked

Can you add multiple records from one add page?

2/6/2016 5:48:39 PM
PHPRunner General questions
pasquito author

Good afternoon from Peru
Reviewing the forum, I found this article very interested to know if and response was found to "add multiple records at once."
http://www.asprunner.com/forums/topic/5760-can-you-add-multiple-records-from-one-add-page/
I want to add something else. You must add the number of records based on data from another table. For this purpose one or more field they are related to the second table. Ie if in the second table 10 elements are indicated, then the addition of 10 entries, where each of the 10 elements is based on the self-filling related field becomes.
Waiting for your comments.
Sincerely,
Pasquito.

C
chuckbower 2/6/2016

I think you're going to need to create custom code in your After Add event to do this.
Chuck



Good afternoon from Peru
Reviewing the forum, I found this article very interested to know if and response was found to "add multiple records at once."
http://www.asprunner.com/forums/topic/5760-can-you-add-multiple-records-from-one-add-page/
I want to add something else. You must add the number of records based on data from another table. For this purpose one or more field they are related to the second table. Ie if in the second table 10 elements are indicated, then the addition of 10 entries, where each of the 10 elements is based on the self-filling related field becomes.
Waiting for your comments.
Sincerely,
Pasquito.

pasquito author 2/8/2016

Thank you very much for the advice
I was thinking of using some ability that was shared by admin
http://xlinesoft.com/blog/2016/01/21/speed-up-data-entry/
There might be someone who has already codified this case for any project.
Although I think it would be excellent if it PHPRunner natively implemented.

admin 2/9/2016

pasquito,
the post you mentioning already provides the code that you just need to copy and paste.

pasquito author 2/10/2016



pasquito,
the post you mentioning already provides the code that you just need to copy and paste.


Admin Thanks for responding.
The code which refers guess this is it.
The Addonload would contain the following but is there then a way to acces input i :
echo '<tr>

<td width="150px">'.$row['Name'].'</td>

<td align=center><input type="text" id="input'.$i.'" value="input'.$i.'" name="input'.$i.'" /><td>

</tr>

admin 2/10/2016

Not sure what you mean. This is not the code from the article you mentioned.

pasquito author 2/11/2016



Not sure what you mean. This is not the code from the article you mentioned.


Sergey
Really I've searched and I searched, but I can not find the code that you indicate that you are ready to copy / paste.

admin 2/11/2016
pasquito author 2/12/2016

The contribution of admin in the blog article (http://www.asprunner.com/forums/topic/5760-can-you-add-multiple-records-from-one-add-page/) is one that helps much though; the challenge goes a little further to add multiple records.
CHALLENGE: add a number of records in a table, based on information from another table.
Graphically would be represented as follows (I hope to convey the idea) ...


Once, I consider that implement this feature in PHPRunner / ASPRunner would be excellent, as it would help the user to quickly and easily populate data. What do you think?
Awaiting your comments and help in this challenge.

admin 2/13/2016

Yes, this is possible but a serious amount of coding will be required. You will need to add your custom button to the List page, perform all calculations on the server side and then in ClientAfter event of your button issue 'Inline Add' command several times. Pre-filling new records with some values can be more complicated especially if values are going to be different for each row.
You either need to write this code on your own or to hire someone. I would estimate that 2-3 hours of coding will be required to get this to work.

pasquito author 2/16/2016

Is it possible to add this feature as a feature of its own in the next revision of PHPRunner / ASPRunner?

admin 2/16/2016

No, simply not possible. This is not a feature but just a bunch of business logic that only applies to your project.