Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 2nd December 2003, 14:48
en@frrom en@frrom is offline
Guru
 
Join Date: Aug 2003
Location: Belgium
Posts: 1,219
en@frrom will become famous soon enough
Baan: B50B - DB: Oracle 8.0 - OS: Win2k AS
window id for refresh()

Hi,

I need to refresh a session in program script, but a different session, not the current one, nor a parent or child.

I.e.
- Session a, b, c
- a is zooming to b [so in b the predefined variable parent indicates the pid of a]
- then b zooms to c, and c imports the pid of a.
- Then c closes b through kill(parent), then updates data, then closes itself (execute(end.program). But before leaving c (end.program), I want c to refresh a (because c updates data currently displayed in a).

In refresh() I can pass the window_id as an argument. Which value is the window_id, it is not the same as the process_id, is it? So, I would need to import the window_id of a into c, instead of the process_id.


Thanks in advance,

En.
Reply With Quote
  #2  
Old 2nd December 2003, 19:56
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,032
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
En,

Try refresh.parent(-1)

if that doesnt work -

use - refresh()

You can get the window id from -
Code:
pstat(pid, progname, info)
winid = ps.mwin(info)
You can also check the function - wrebuild()
Quote:
0 All windows are refreshed.
1 The screen is cleared and all windows are rebuilt.
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #3  
Old 3rd December 2003, 13:45
en@frrom en@frrom is offline
Guru
 
Join Date: Aug 2003
Location: Belgium
Posts: 1,219
en@frrom will become famous soon enough
Baan: B50B - DB: Oracle 8.0 - OS: Win2k AS
Unhappy

NP,

Thanks for your suggestions.

However, non of them worked for me

- Refresh.parent(-1) : no result
- Refresh(winid) fetched by pstat() with ps.mwin(info) didn't work.
- Wrebuild(0) : didn't work
- wrebuild(1) : didn't work

I don't understand though why refresh(winid) didn't do anything. I have never really tried using refresh for a different process, but it doesn't seem to work well. Anybody experiences with that??
Reply With Quote
  #4  
Old 4th December 2003, 10:26
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,032
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
En,

I am guessing you are zooming from a field, then you can try to explore using -
Quote:
after.zoom:
The actions programmed in this subsection are executed when the zoom process on a specified field ends. You can use this subsection, for example, to redisplay any field that has changed as a result of the zoom process.
Code:
field.abc:
after.zoom:
     execute(first.set)
|* or try refresh() here
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #5  
Old 4th December 2003, 10:35
en@frrom en@frrom is offline
Guru
 
Join Date: Aug 2003
Location: Belgium
Posts: 1,219
en@frrom will become famous soon enough
Baan: B50B - DB: Oracle 8.0 - OS: Win2k AS
NP,

I'm not zooming from a field. I am zooming from both session a -> b and b -> c via form-command (Specific/Form button).

Have you ever used refresh for a session different from the executing session?? Logically it should work, because I do get the win_id passed along the sessions (from session a till c) but just the command refresh(winid) doesn't seem to do anything...

This is quite important for me...


Kind regards,

En.
Reply With Quote
  #6  
Old 5th December 2003, 21:30
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,032
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
En,

Refer to the link - Section for Form Commands?

Then you can use a refresh() in the after.zoom section.

Else, if you can try to use the form command options and 2nd form tab execution -
Attached Images
File Type: jpg view-commands.jpg (32.9 KB, 57 views)
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
Sponsored Links
  #7  
Old 8th December 2003, 21:00
en@frrom en@frrom is offline
Guru
 
Join Date: Aug 2003
Location: Belgium
Posts: 1,219
en@frrom will become famous soon enough
Baan: B50B - DB: Oracle 8.0 - OS: Win2k AS
NP, Thanks for your attempt to help, but my whole problem is that when session b is still active, the data of session a has not yet been updated. The updating of the data for session a is done by session c only after session b has been killed by session c.

I am including the piece of code that handles it.

Code:
zoom.from.tssoc2121s000:		
on.entry:
	get.screen.defaults()
	from.service = true
	import("winid", service.winid)
	import("tssoc220.orno", service.orno)
	import("tssoc220.lino", service.pono)
|	message("service window: %s", service.winid)
	runnumber = "SC"
	oorg.f = whinh.oorg.service
	oorg.t = whinh.oorg.service
	orno.f = service.orno
	orno.t = service.orno
	pono.f = service.pono
	pono.t = service.pono
	pradvice = tcyesno.no
	prshortage = tcyesno.yes
	display("runnumber")
	display("oorg.f")
	display("oorg.t")
	display("orno.f")
	display("orno.t")
	display("pono.f")
	display("pono.t")
	fill.order.prio()
	kill(parent)
	execute(user.2)	
|	first.window(service.winid)
	refresh(service.winid)
|	wrebuild(0)
	execute(end.program)
this is in session whinh4200m000 (process outbound). I am zooming here from serviceorders-material-costs (tssoc2120s000). The entire warehousing part is done automatically by hitting the button from tssoc2120s000.

Technically I must close (kill) tssoc2120s000 before processing the outbound, so that's why I use kill(parent) before processing outbound. I need to refresh the session a, which is session tssoc2520m000, the overview session of material-costs. I need the delivered quantity to be updated with the new value. The window_id is correctly passed on from the parent session. However, the refresh(service.winid) doesn't seem to do anything. I also tried using wrebuild(0), wrebuild(1) and refresh.parent(-1) and even first.window(service.winid). No result so far...

Would still appreciate very much an idea for resolution. Maybe I can achieve the desired issue in a different way??

Best regards,

En.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AFS Problem device window not appering loveneesh AFS/DDC/OLE: Function servers 1 18th May 2004 15:30
How to add input window to report script justone Tools Development 11 28th February 2004 21:09


All times are GMT +2. The time now is 10:51.


©2001-2017 - Baanboard.com - Baanforums.com