Order Lines Entry

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Order Lines Entry

Post by customaware »

Picture this....

I have a Query which displays Order (OrderHeader BO)

I have an Add New Order Panel Operation Button.

I create a New Order from that button.

The Form is displayed on the screen and the Reference Grid for the Order Lines at the bottom of the form.

Normally, I would have a Panel Operation button for Add New Line (Add Reference) and Operations with Rows or Edit and Delete.

However, instead of Adding an Order Line and then having to Click the Add New Line Button.... I want Form on which I am Adding the New Order Line to have two
buttons.... Another and Finish.

When I click Another than immediately a new OrderLine form is displayed and so on.
If I click Finished..... OrderLine Form Closes and the Order Header Query refreshes and shows the New Order Header Line.

I have tried a number of ways and always seem to run into a problem......
Such as, Cannot get the Original Order Query to refresh (regardless of the Processes or BOs I add to trigger the refresh.
Or, cannot get the OrderLine Form (ENTER NEW from a Process) to call the same Process on Save and close

Would appreciate any ideas to try please.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Order Lines Entry

Post by PointsWell »

I have similarly had problems getting a grid to refresh after a pop up pick one or more form. I ended up just using DISPLAY QueryName instead of relying on refresh.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Order Lines Entry

Post by tford »

Back in the olden AwareIM days .. before AutoRefresh if you can believe life without that ... sometimes you'd trick the system by updating an underlying value to trigger a refresh.

I wonder if it would work to have your process update a value in OrderHeader BO that might trigger an AutoRefresh.
Tom - V8.8 build 3137 - MySql / PostGres
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Order Lines Entry

Post by hpl123 »

I've had similar problems and don't have a specific solution for you but a hack I have used is to bypass the ENTER NEW solution and instead do a CREATE followed by a VIEW (VIEW is normally displayed in the main screen i.e not a popup but if you create a custom js function using the awareapp functions you can get a VIEW to show in a popup thereby bypassing Aware locking execution like it does with ENTER NEW and EDIT operations). That creates another "dynamic"/working in the app and autorefresh might work for you in that case. Not sure it does and/or helps but may be worth a try if you can't get it working.

Another thing could be instead of a query, create a "temp" BO that holds some attribute and a reference to the data you want to display (i.e instead of the query you show a form in the VP mimicking a query which basically only shows the reference/children). Then you can use some action in the processes you use to update some dummy attribute and thereby executing a refresh. Cumbersome yes but will most likely work.

I have these types of hacks here and there in my apps and works fine. Most things are possible in Aware even though some of the solutions are cumbersome.
Henrik (V8 Developer Ed. - Windows)
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Order Lines Entry

Post by Jaymer »

eagles9999 wrote: 1) Such as, Cannot get the Original Order Query to refresh (regardless of the Processes or BOs I add to trigger the refresh.
2) Or, cannot get the OrderLine Form (ENTER NEW from a Process) to call the same Process on Save and close
Personally, I don't fully understand what you mean in these 2 issues. Its fuzzy to me.

You say the Order Form is Open once you are finished with Lines. So you need a Process to run when you click the Close button to close that Form.
Wouldn't that be what triggers the Redraw on the top-level Order Query?
No idea on #2
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply