Baanboard.com

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

User login

Frontpage Sponsor

Main

Poll
As a Customer What would do to keep your ERP Implementation intact
Proactively define Business Process-- Take the Project Ownership
50%
Handover everything to System Integrator from drawing BP till implementation of ERP
17%
Hire more inhouse skilled & capable IT Resource to work directly with SI
33%
Rely on SI Architects/Consultants
0%
Total votes: 12

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #16  
Old 16th March 2021, 08:33
andreas.toepper andreas.toepper is offline
Senior Member
 
Join Date: Jun 2004
Posts: 222
andreas.toepper is on a distinguished road
Baan: Baan4, LN6.1 - DB: MSSQL - OS: Linux&Windows
Is your own session a subsession of the item data session? If you can modify both sessions it may be possible to add message bases refresh function to the subsession.

This is done using the prcm functions.

It works like this: the master session will send a refresh message and in the subsession you will have to react on this message.

I will give an easy example I use. I've taken the basic code from the example in the reference guide and modified it.
I have a table tseqs200. If a dataset is changed, the DAL will send a change message to the subsessions.

This is done by a simple call of function prcm.notify("tseqs200") in the DAL of tseqs200 in hook before.save.object().

In the subsession I added the following code, to react on the message:

Code:
before.program:
	|Listen on messages from table:
	prcm.register("tseqs200")

choice.bms:
on.choice:
    if prcm.bms.is.notification() then
        on case prcm.get.subject()
        case "tseqs200": |* An update is done on table tseqs200
            |* Refresh all data on the screen
            refresh.all.occs()
            break
        endcase
    endif
This is explaned in the reference guide in "Process Change Manager Code Examples" (check the pcrm functions; pcrm.notify will have a link to the example code).
Reply With Quote
  #17  
Old 16th March 2021, 12:49
vahdani's Avatar
vahdani vahdani is offline
Guru
 
Join Date: Aug 2002
Location: Cologne, Germany
Posts: 471
vahdani is on a distinguished road
Baan: all - DB: all - OS: Unix / Win2K
The probem is that alle the solutions mentioned (timer or prcm.notification) work fine if you still use the now "outdated" GUI user interface. If on the other hand you use the web based LN UI as we are all now supposed to do, then I can confirm that none of these solutions work and as mentioned by Martin you have to click sowehere on the screen to force a refresh!!

So we have to put the question to any Infor insiders who read this: Do you know about this in my opinion very disturbing problem? Do you have any solution that you can tell us about?
__________________
May the force be with you!
Reply With Quote
  #18  
Old 16th March 2021, 14:47
andreas.toepper andreas.toepper is offline
Senior Member
 
Join Date: Jun 2004
Posts: 222
andreas.toepper is on a distinguished road
Baan: Baan4, LN6.1 - DB: MSSQL - OS: Linux&Windows
Well, I just can tell, that prcm.notification works on our soon to be live system (LN 10.7; LNUI on Google Chrome).
The code I quoted has been used in the WEBUI of our LN 10.2 live system (Internet Explorer). I remember adding the code, because some key user asked to see entered data in another session without refreshing the screen. (It's working in Worktop, too. I've checked it right now.)

This may depend on some setup details, i.e. the sub session which is listening to the prcm message is linked as a synchronized dialog.
I did some testing in LN 10.7 (LNUI) and deactivated the bms code in the synchronised child. It then did no longer auto refresh.

I did change the code using BECS but tested in Google Chrome. Maybe someone will find a reason why it's working on some systems, while others won't work as expected.

Update: TIV of the script is rather old (1812). Thats the TIV of the LN 10.2 system. Still worked when changing to latest TIV 2310 in the child session.

Last edited by andreas.toepper : 16th March 2021 at 14:54.
Reply With Quote
Sponsored Links
  #19  
Old 16th March 2021, 15:50
vahdani's Avatar
vahdani vahdani is offline
Guru
 
Join Date: Aug 2002
Location: Cologne, Germany
Posts: 471
vahdani is on a distinguished road
Baan: all - DB: all - OS: Unix / Win2K
Hi Andreas,
as you say this may have something to do with the setup!

In may case I have tested with a GUI-Sender and a Gui-Receiver and an LN UI-Receiver under Chrome (see below) and in my test only the GUI-receiver actualises with no user interaction! By the way I used your prcm example with refresh.all.occs()

Any case a tip from Infor experts is appreciated
Attached Images
File Type: png LN UI vs GUI Actualisation.png (105.5 KB, 6 views)
__________________
May the force be with you!
Reply With Quote
  #20  
Old 17th March 2021, 07:26
andreas.toepper andreas.toepper is offline
Senior Member
 
Join Date: Jun 2004
Posts: 222
andreas.toepper is on a distinguished road
Baan: Baan4, LN6.1 - DB: MSSQL - OS: Linux&Windows
Are we talking about one sender and two receivers using different clients? So sending from worktop and receiving in LNUI (second login)?
I don't know whether this 'global' messaging and refreshing will work. I did my implementation based on a single login. I think prcm is bound to one login (bshell).
My reference guide knows of another communication way: interprocess communication on OS level, while prcm is interprocess communication on bshell level.
(Search: "bms messages: sample program"; the related topics at the bottom of the page will show the links)
I did never used this way of sending messages across bshells. And an example code is missing in the reference guide.

Geht es hier um Bshell übergreifende Nachrichten? Die PRCM-Funktionen, die ich hier genutzt habe, arbeiten (soweit ich das versehe) nur in einer Bshell. Im Reference-Guide bin ich aber auf eine zweite Methode gestoßen, die offenbar gedacht ist, um Nachrichten über Bshell-Grenzen hinweg zu senden.
(Findet man unter „bms messages: sample program“; am Seitenende sind die Links zu finden)
Die Methode habe ich selbst auch noch nicht genutzt. Es fehlt leider auch eine Beispiel im Reference Guide von Infor.
Reply With Quote
  #21  
Old 17th March 2021, 12:34
martin.f martin.f is offline
Member
 
Join Date: Nov 2019
Location: Germany, Kempten
Posts: 88
martin.f is on a distinguished road
Baan: LN 10.5 - Baan IV - DB: Microsoft SQL - OS: Microsoft Windows 10
My goal is to have a session on monitor (e.g. warehouse orders session) that refreshes automatically without any user interaction. (many potential senders)

Vahdani demonstrated that this works with GUI but not with LN UI.

Does anybody know how this works with LN UI?
Reply With Quote
  #22  
Old 17th March 2021, 20:05
martin.f martin.f is offline
Member
 
Join Date: Nov 2019
Location: Germany, Kempten
Posts: 88
martin.f is on a distinguished road
Baan: LN 10.5 - Baan IV - DB: Microsoft SQL - OS: Microsoft Windows 10
Also thank you Andreas for your detailed help. I appreciate this community.

I've also tried your code fragment and it is not working on my system (LN UI).
Google Chrome & IE

Under my understand it must be on OS level, right?
For example, one user creates a warehouse order (separate bushell) and I want to see this order in my list (separate bshell) without interaction.

Regards
Martin
Reply With Quote
  #23  
Old 18th March 2021, 08:59
vahdani's Avatar
vahdani vahdani is offline
Guru
 
Join Date: Aug 2002
Location: Cologne, Germany
Posts: 471
vahdani is on a distinguished road
Baan: all - DB: all - OS: Unix / Win2K
Hi Martin,

Your Solution with setting the timer with set.timer() and catching the timer with choice,interrupt has always been the correct solution in GUI times that I had used myself for exactly similar situation that you describe! I tried this a couple of day ago and it does still work in GUI and not in LNUI! The documentation does not mention this!!

The question we should put to directlyto Infor ist why this does not work in LN UI? And if there is a way/trick one could activate the timer mechanism in LN UI?

alles Gute und bleib gesund!
__________________
May the force be with you!
Reply With Quote
  #24  
Old 19th March 2021, 07:31
andreas.toepper andreas.toepper is offline
Senior Member
 
Join Date: Jun 2004
Posts: 222
andreas.toepper is on a distinguished road
Baan: Baan4, LN6.1 - DB: MSSQL - OS: Linux&Windows
There's an option in the user data template where you can enter a refresh rate. Maybe this is still working (the parameter is still presend in LN 10.7). From TIV 1800 on there's also a function to overwrite this setting: set.refresh.rate(..)

But's it grouped with character based windows (classical gui), so it may be depreciated, too. (But adding a char based funkction with ES8.8 sounds weird, doesn't it?)
Reply With Quote
  #25  
Old 19th March 2021, 08:35
martin.f martin.f is offline
Member
 
Join Date: Nov 2019
Location: Germany, Kempten
Posts: 88
martin.f is on a distinguished road
Baan: LN 10.5 - Baan IV - DB: Microsoft SQL - OS: Microsoft Windows 10
Hello Andreas,
Yesterday I found a solution for this problem:

see also KB 1891460

Like you said, each user is linked to a standard refresh rate (user template ttams1110m000).
This refresh rate can be overwritten with the function set.refresh.rate(time in seconds)

However, refresh only works for sessions with standard form command "auto refresh" on German "Aktualisierungsintervall festlegen".
This was disabled for session warehouse orders.

Now everything works as expected.

Regards
Martin
Reply With Quote
  #26  
Old 6th April 2021, 20:01
BaaNovva's Avatar
BaaNovva BaaNovva is offline
Member
 
Join Date: Mar 2003
Location: Bangalore
Posts: 54
BaaNovva is on a distinguished road
Baan: BaanIV, BaanV - DB: Oracle,Sybase - OS: Win2K
Quote:
Originally Posted by baan_afbs View Post
I have a custom display session which basically shows item data. This data needs to be in sync with the Maintain Item data. how can i have the screen automatically refresh without having the user choose the 'refresh' option? Can it refresh every 10 seconds automatically? i can use the function werebuild(1) or refresh.curr.occur().....but how can i trigger this function without the user even touching the keyboard or mouse??

thanks!!!
Sometimes displays/refresh simply does not work as expected.
I had similar issues on a single field maintain session with all other fields as display. So when your display session gets opened and during synchronizing with Item master, when a particular field undergoes a value change, do the following under when.field.changes:, add all three display methods as given below. At least one would trigger an auto refresh to the changed field.
This works fine for me, repeat this for all fields that may undergo changes :
when.field.changes:
display.all()
execute(display.set)
execute(find.data)
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
refresh a screen field pitfloner Tools Development 2 10th June 2003 18:38
refresh screen jpadilla Tools Development 3 30th August 2002 18:42


All times are GMT +2. The time now is 14:36.


©2001-2021 - Baanboard.com - Baanforums.com