cherokee
29th July 2008, 21:41
Hi everyone,

I want to know if the user clicked on "Cancel" on my called session.

Session A calls sub-session b, user decide to abort what he/she is doing and clicks on the "Cancel" button on sub-session b; control returns to session A. How do I know that user clicked on the "Cancel" button once the control is back to session A.

Thanks in advance.

vijielan
30th July 2008, 07:34
In the choice section of session b, use a variable and assign it with some value in case of cancel and export it to session A or even use a global variable.

cherokee
30th July 2008, 14:49
Yes, that is a solution if I can modify b. I thought there could be a solution without modifying b, such as a var that can be passed on the zoom.to$(process,zoomcode,zoomname,"RetFld"",fpos) that will return a specific value.

Thanks a lot anyway.

mark_h
30th July 2008, 15:26
Well - without knowing the situation I do it as was recommended by vijielan. It might be possible to include a field in the zoom.to and if the user hits cancel it might be empty. I guess without knowing the sessions it is hard to say if it would work.

Hitesh Shah
30th July 2008, 15:56
If u check the string return value of zoom.to$ , it will be blank when user presses cancel .e.g.

if isspace(zoom.to$(process,zoomcode,zoomname,"RetFld"",fpos) ) then
|Cancel is pressed
endif

retfld is the field code to return from the subprocess.

cherokee
30th July 2008, 18:41
I tried Hitesh Shah solution and works fine.

Thanks to all.