EDIT Form From a Process

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: 2433
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

EDIT Form From a Process

Post by customaware »

This has cropped up many times over the years and has probably been answered but I have not been able to find a suitable solution or have forgotten .

So, imagine you have a BO Form with a Reference Query on the form in with you can Add, Edit or Delete child records.

If you EDIT that BO Form directly from a screen button then no problem. The form can be in a PopUp and still functions correctly.

But if you execute and EDIT BO Using... from a Process and it displays a Popup... then the behaviour is different.... If you try and Add a new record to the Reference Query, then Aware asks if you want to cancel the current operation....

CancelOperation.png
CancelOperation.png (5.34 KiB) Viewed 7306 times
To avoid this, I generally always display the Form in a New Tab which generally is fine.
But this looks stupid when it is only a small form with a small amount data or in my current issue where I cannot force the Form to open in a New Tab.

I am calling a Process from the Context Menu of a Schedule Timeline Control and I can indeed select the Output there as New Tab....
It passes a BO Instance to the called Process... then finds the required record of a related BO and then I execute an EDIT of that found record....

No matter what I do I cannot get it to open in a New Tab. Always displays as a Popup and then of course the Cancel dialog kicks in when I try and add a child record to the reference Query.

Can anyone advise a way around this or refresh my memory of a previous solution please?
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
nhofkes
Posts: 129
Joined: Mon Sep 07, 2020 6:03 am
Location: Netherlands

Re: EDIT Form From a Process

Post by nhofkes »

Hi Mark,

Is the 'EDIT BO' action the last one in your process, or is that followed by any subsequent process steps?

As explained in the user manual regarding the 'single tab mode' for processes, by default all intermediate process operations are performed in a popup window. The first and all subsequent actions except the last one are considered to be intermediate actions. And if I understand the manual correctly, even the last action in a process could be considered an intermediate action, if it expects input from the user.

So, if the EDIT BO action isn't the last action in your process, you could try to rework to make it the last one. If that doesn't help, you could try VIEW BO instead of EDIT BO. Despite its name, VIEW can also be used for editing the BO. The difference is just that when using VIEW, the process does not wait for the user to change the values of the object and continues immediately after displaying the form. Only when adding the NOEDIT after VIEW is the action really a view. (Personally, I find this very confusing - the name of the action does not match with the actual behaviour).

As to the 'Do you want to cancel current operation' message: I found that this typically occurs when during a process some other process is started by the user. Because the original process is not yet finalized, Aware thinks that the user wants to cancel that process and to start something new. So both issues may have the same underlying cause: the process calling EDIT BO is not yet finalized, which means that output is displayed as a popup and that the 'cancel current operation' message is displayed when the user starts another process from the form.
Niels
(V9.0 build 3272 - MariaDB - Windows)
customaware
Posts: 2433
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: EDIT Form From a Process

Post by customaware »

OMG!

Thanx nhofkes for your reply....

That was not the issue as my EDIT was the last Action in the Process.... but...

It was one of those situations where the more you learn the more you forget.

The one thing I did not check… I was calling a process to Add New rather than Add Reference… Duh! 🥴

Fixed. Sometimes I feel so dumb! 🤣
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
rbross
Posts: 449
Joined: Wed Nov 19, 2014 4:13 am
Location: Coventry, Connecticut USA

Re: EDIT Form From a Process

Post by rbross »

Mark, Try use VIEW BO USING instead.
Vlad said this is the better method to use when editing a BO from a process.
Roger Ross
AwareIM 9.0 (build 3279) ~ MS-SQLExpress ~ Windows Server 2022
AwareIM 8.7 (build 3025) ~ MS-SQLExpress ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQLExpress ~ Windows 10 ~
Post Reply