If you have questions or if you want to share your opinion about Aware IM post your message on this forum
#53976 by eagles9999
Tue May 26, 2020 7:04 am
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.
#53977 by PointsWell
Tue May 26, 2020 8:15 am
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.
#53978 by tford
Tue May 26, 2020 2:54 pm
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.
#53979 by hpl123
Tue May 26, 2020 4:02 pm
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.
#53980 by Jaymer
Tue May 26, 2020 6:27 pm
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

Who is online

Users browsing this forum: No registered users and 33 guests