This topic is locked

redirect to details table after add with multiple masterkeys

11/6/2016 1:11:45 AM
PHPRunner General questions
B
bioman author

Hi,

I am trying to redirect my users to a details table after adding a master record. I have read the following article but it only addresses how to re-direct with one masterkey:

https://asprunner.com/phprunner/docs/redirect_to_details_page_after_master_record_was_added.htm
If I have several masterkeys, what would the syntax be? I've tried several things but get syntax errors. I would like to place this in an after add event. Thanks for your help,

Brett

Sergey Kornilov admin 11/7/2016

Use a built-in option in PHPRunner for this purpose. 'Choose pages' screen, Add page settings, 'After record is added' actions.

B
bioman author 11/7/2016

Hi,

I have version 8.1 Enterprise edition. Does it have add page settings or is this new?

B
bioman author 11/7/2016

Never mind. I think I found it. Thanks!>

Hi,

I have version 8.1 Enterprise edition. Does it have add page settings or is this new?

B
bioman author 11/7/2016

Hi,

I just tried this but it doesn't seem to retain the masterkeys. It just goes to the list page for the details table but doesn't have the masterkeys. In a test environment,the URL looks like this http://localhost:8085/quiz_list.php (where quiz is the name of the table). I need it to have the URL parameters for all of the masterkeys (there are 5 masterkeys). If you click on the details links from a master list page, it does this automatically. I just want this same thing to happen after adding a record to the master table, so that you can then add records to the details table for that specific master table.
The URL should look more like this:

"http://localhost:8085/quiz_list.php?mastertable=quiznames&masterkey1=Cell%20Quiz%3A%20Topic%201.1&masterkey2=80&masterkey3=IB%20Biology&masterkey4=54&masterkey5=Science"
Can this be accomplished automatically using the method you described or do I need to code it differently? Thanks,

Brett

Sergey Kornilov admin 11/8/2016

I'm afraid you doing something wrong. You should be redirected to the Add page of the details table after adding a record to master table. Nothing should appear in the URL since master keys are saved in session variables.

B
bioman author 11/9/2016

Hi,

The reason it appeared to not work was that I was going to the details list page rather than the details add page. The reason I was doing this is because I have multiple add methods that I'd like my users to be able to choose from the list page. Setting the application to go to the details list page does not seem to work still, but going to the details add page does. When redirected to the list page, all records are displayed, not just those relevant to the master table. Can this be fixed or is there a workaround? Thanks,

Brett



I'm afraid you doing something wrong. You should be redirected to the Add page of the details table after adding a record to master table. Nothing should appear in the URL since master keys are saved in session variables.

Sergey Kornilov admin 11/9/2016

What you saying make zero sense to me. This feature is designed to redirect you to specific page after master record is added. It is not that you should go anywhere manually, you will be redirected automatically. Simply doesn't make any sense.