add new order, open to line item table view

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
grimblefritz
AppGini Super Hero
AppGini Super Hero
Posts: 336
Joined: 2015-12-23 16:52

add new order, open to line item table view

Post by grimblefritz » 2016-07-12 10:12

Starting a different thread, because I think I mis-stated my goal in the other thread.

Here's what I'm looking to do, assuming two tables, orders and lineitems.

1. Add new orders record
2. When Save is clicked, open table view for line items, filtered for the newly added order

In this way, as the user ads an order, the next thing they see is the list of line items, which is initially empty. When they click to add a new line item, however, the order id is already preset to the new order.

I think the way to do this is, after the orders record is saved, redirect to lineitems_item_view.php?filterer_lineitems_id=#. Where # is the record id of the newly added order.

Now I just have to figure out HOW/WHERE to put that.

Ahmad, if you're seeing this, it would be useful if this was possible from AppGini. Is there an option in the redirect after insert entry, for a stand-in for the just inserted record id? Some kind of macro such as <%%ID%%>?

grimblefritz
AppGini Super Hero
AppGini Super Hero
Posts: 336
Joined: 2015-12-23 16:52

Re: add new order, open to line item table view

Post by grimblefritz » 2016-07-12 10:54

I have to remember to scroll down in the F1 help dialog for AG fields :/

In the redirect after insert property in AppGini, #ID# substitutes the newly inserted id.

So the solution is simple. In that field put:

lineitems_view.php?filterer_orders_id=#ID#


You know, I think when he wrote AppGini, Ahmad had his thinking cap on :)

Post Reply