Is there a way to have the menu panel or nav selection, open to the detail view instead of the table view? With the first record selected, that is acceptable.
Also, is it possible when a new record is added (for example, an order) and saved, to immediately go to the order_item table or detail view? That would simplify the order entry (or generally, the parent->child data entry) process.
There may be ways to do this, but I'm so far into the weeds on other projects, I just don't have the cycles to dig into this.
Thanks
open directory to detail view
-
- AppGini Super Hero
- Posts: 336
- Joined: 2015-12-23 16:52
Re: open directory to detail view
Built into AppGini. Select the desired table and apply redirection after insert.Also, is it possible when a new record is added (for example, an order) and saved, to immediately go to the order_item table or detail view?
For same result after Appgini Files are generated, you could edit this line in the concerned tablename_view.php
$x->RedirectAfterInsert = "your_desired_page.php";
Or as a hook:
RedirectAfter Insert is also a Datalist object: https://bigprof.com/appgini/help/advanc ... ist-object
So you should be able to include the redirection as a hook as per this example: https://bigprof.com/appgini/help/advanc ... ename_init
-
- AppGini Super Hero
- Posts: 336
- Joined: 2015-12-23 16:52
Re: open directory to detail view
peebee, thanks for that. I'd missed the redirection in appgini. If that doesn't do what I want, then I'll try the hook.
Some parts of appgini I'm getting pretty familiar with, others are still unknown territory.
What about opening straight to the detail view, instead of table view - any ideas there?
Some parts of appgini I'm getting pretty familiar with, others are still unknown territory.
What about opening straight to the detail view, instead of table view - any ideas there?
Re: open directory to detail view
URL "tablename_view.php?addNew_x=1" will take you directly to an "Add new" detail view which I imagine would be preferable to opening to the first/same record every time?
How to go about it would probably depend where you want to direct to the detail view from? Is this the home page links you are referring to or the dropdown navigation?
How to go about it would probably depend where you want to direct to the detail view from? Is this the home page links you are referring to or the dropdown navigation?
-
- AppGini Super Hero
- Posts: 336
- Joined: 2015-12-23 16:52
Re: open directory to detail view
No, I actually want the first record. I have a setup table for the app. Only admin can insert/delete, one user in a Owner group can edit, and everyone else can only view. So, opening to the detail view is what I need.
I suppose I could hide the table from the home page and dropdown, then use a custom link to call it using ?SelectedID=1. That would work, but I'd prefer to keep the standard navigation.
I suppose I could hide the table from the home page and dropdown, then use a custom link to call it using ?SelectedID=1. That would work, but I'd prefer to keep the standard navigation.
-
- AppGini Super Hero
- Posts: 336
- Joined: 2015-12-23 16:52
Re: open directory to detail view
Sometimes you just have to sleep on things and express them different.
The solution is terribly simple!
In hooks/tablename.php, function tablename_header(), switch case 'tableview', place this line:
When the table is selected from either homepage or dropdown, it is redirected to the detail view for record 1.
When the back/cancel button is clicked from the detail view, it simply reloads the detail view.
Perfect!
The solution is terribly simple!
In hooks/tablename.php, function tablename_header(), switch case 'tableview', place this line:
Code: Select all
header('Location: tablename_view.php?SelectedID=1');
When the back/cancel button is clicked from the detail view, it simply reloads the detail view.
Perfect!