Open Modeless Window from Process.

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Madimant
Posts: 35
Joined: Tue Aug 08, 2017 11:39 pm

Open Modeless Window from Process.

Post by Madimant »

Morning

Has anybody ever found a way to open a Form in modeless window from a process?
I looked in the forum and looks like Forms always open as a popup?

https://www.awareim.com/forum/viewtopic ... ess#p42738

I have a Client Form with a button to 'Send Email' to the Client.
The button runs a process with about 10 lines which (Button output is set to 'modeless') and I want to run a process, pause on a form to make changes, and then send the email.

The process currently:-
1. creates the new email,
2. add all the email addresses,
3. some records in child relative grid (which I use later to generate attachments for the final email to send),
4. display the form with 'VIEW Email WITH SendMailForm'.
5. after completing selections/changes to the Email Form by the user, runs another process that generates the 'outbound email' with changes made in step 4 and sends it.

The problem is that the form displays as a popup in step 4 and then any changes I try to make to the displayed form pops up with a message 'Do you want to cancel the current operation'.

I tied using EXEC_SCRIPT 'AwareApp.startProcess2(`viewEmail`,`Email`,'+AS_STRING(Email.ID)+',{modeless: true, position: {top: 100, right: 100 }}); '
but the process never pauses or brings up the Form, just runs to completion or pops up with a message 'Do you want to cancel the current operation'..

Pulling my hair out here!
Any suggestions?

Tj
Tj
Using Version 8.6 Build 2917 - mySQL
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Open Modeless Window from Process.

Post by PointsWell »

EDIT and VIEW have different outcomes

From the manual
The VIEW action is very similar to the EDIT action. The difference is that the process in which the action has been called does not wait for the user to change the values of the object and continues execution immediately after displaying the form.
Try EDIT instead.
Madimant
Posts: 35
Joined: Tue Aug 08, 2017 11:39 pm

Re: Open Modeless Window from Process.

Post by Madimant »

Tried that, same issue.
Tj
Using Version 8.6 Build 2917 - mySQL
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Open Modeless Window from Process.

Post by PointsWell »

Madimant wrote:Tried that, same issue.
On the form with the Save button on it, have you tried adding the second part of the process to the run after save process. It sounds like the process starts and there is another process being triggered before the form has been saved.

I'm not at my desktop so can't check the exact name of the settings.
customaware
Posts: 2413
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Open Modeless Window from Process.

Post by customaware »

Where are you calling the Process FROM....

If I remember correctly....you can specify where to Output there and the Process will follow suit.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Madimant
Posts: 35
Joined: Tue Aug 08, 2017 11:39 pm

Re: Open Modeless Window from Process.

Post by Madimant »

Hi Mark/Pointswell

Yes, I have specified the Output on the button on my Client Form but it always end up as a Popup.

I have now managed to get it to show up as a modeless window if I remove all the lines in my process after the VIEW... rule, it has to be the last rule in the process (even had to delete all lines that were set as disabled) and added a new SEND/SAVE button on my Email form to run the second part of the process. (Thanks for tip Pointswell)

BUT now the send/save button won't pass any objects to the new process. (Tried both Save & run process or Run process).
Will try HTML buttons with AwareApp.startProcess2(`sendEmail`,`Email`,'+AS_STRING(Email.ID)+','main') else need to save objects in a temp object and retrieve when second process run.
Tj
Using Version 8.6 Build 2917 - mySQL
Madimant
Posts: 35
Joined: Tue Aug 08, 2017 11:39 pm

Re: Open Modeless Window from Process.

Post by Madimant »

Managed to get it working...

Thanks for the help guys.

Tj
Tj
Using Version 8.6 Build 2917 - mySQL
Post Reply