here's a simple parent-child screen.
the grid are detail recs from a peer multiple The Current Qty field is maintained by a Rule in the Parent:
Code: Select all
If StorageDetails WAS REMOVED FROM TicketStorage.pm_StorageDetails OR
StorageDetails WAS ADDED TO TicketStorage.pm_StorageDetails OR
TicketStorage.pm_StorageDetails.Qty WAS CHANGED THEN
TicketStorage.zActualTime =SUM StorageDetails.Qty WHERE (StorageDetails IN TicketStorage.pm_StorageDetails)
Issue # 1:
the [+ Add Item] button WAS a "Add New Reference".
A popup would appear to enter the Storage Item record.
The Rule fired and the database value was updated and saved (verified in SQL tool), but the Current Qty does not change.
So, you go to the Auto-Refresh Settings of the Form and add "StorageDetail" (the child file) and same result... no redraw on Add.
BUT, if you edit a record, the value updates no problem.
AND, if you manually redraw the top form after an Add, you see the correct value from the db.
Solution to Issue # 1:
Do extra coding to make a Process that does a "CREATE NEW StorageDetail..... "
And, after adding that Process to the Auto-Refresh Settings, sure enough, after an Add (which used the Process), the redraw works.
So, I thought I was done (although slightly annoyed and time wasted) until I added the Delete.
Guess what?
Issue # 2:
Delete a Record, AND THE RULE FIRES and the db is updated, BUT NO REDRAW.
And now, I can't seem to find a hook for the Auto-Refresh Settings to make it redraw.
The text says "If you want to refresh the form after the user saves a Form of any other BO Object, select object below"
Well I'm not Saving a Form, I'm deleting a record.
Of course, I can manually redraw the top form and the value updates correctly.
What am I supposed to do... Keep writing processes to circumvent the built-in operations (that are there to keep this low-code and do things for me)?
But I would think this presents 2 overlooked areas (bugs) where Aware should be refreshing correctly without me having to write workarounds...
OR its been so long since I've written a SIMPLE screen that I've overlooked something.
Any ideas?