This topic is locked

Button Driven Insert Records Into Another Table From List Page

6/1/2009 10:13:19 AM
PHPRunner General questions
D
dilbertbert author

I need to have a button on a list page that will insert record fields into another table. The purpose of this is to form a history file of transactions. Many fields on the list page are calculated "as" fields generated from the SQL Query.
Is this possible?

J
Jane 6/2/2009

Hi,
I'm not sure that I understand your question.

Do you want to insert only one record on the list page?

D
DigitalDean8 6/9/2009

Hi,

I'm not sure that I understand your question.

Do you want to insert only one record on the list page?


Actually I understand his question and have a similar issue that I need assistance with. I would like to have a button appear to certain user groups on a "VIEW" page that when clicked takes you to an ADD page for a different table but retains the UserID of the Session that gets auto populated into a table field in the table assocated with the ADD page. How can I create a script to put into button that allows this? The scenario I am working on is this:
Automobile types being listed, user clicks "VIEW" to see all the details of the specific vehicle type. If they want to add their own personal review/comments about that model I want them to be able to click a button that links to a "review" ADD page where their Username is inserted into the new record so that they get credit for the review. I am confident it's possible, just not sure how. Also I want to make sure that only users with a specific UserGroup type can see this button.
Any help is appreciated.

D
dilbertbert author 6/11/2009

Sorry so long to reply.
I actually want to insert the result of a list page (all records) into another table.
I've thought about this more and it only gets more complicated, once a record has been inserted into the other table I want to stop it from being inserted again, that is unless it has been previously deleted from the target table.

J
Jane 6/16/2009

Hi,
use List page: After record processed event on the Events tab for this purpose.

Check if current record exists in another table and add new record if needed in this event.