Svidos29
25th May 2018, 13:39
Hi all, i've created a FORM command that is disabled when the session MMT starts. I want that if a record is selected (with some conditions) the form command must be enabled. How can i do this? Because the form command is in the header session, but the records (rows) are in the satellite session.
I tried with choice.mark.occur/after.choice, in the rows session, but it does not work with (enable.commands("my_formcommand") .

Thanks in advance

giggty
25th May 2018, 14:07
Consider Process Change Manager functionality (prcm.* functions) may be?

Svidos29
25th May 2018, 15:14
Sorry but i never used prcm.* functions, how can it be useful to me?

giggty
25th May 2018, 16:12
Basically you do prcm.register("my.event") in your parent session (inside before.program for example), add the needed logic into choice.bms section:

choice.bms:
on.choice:
if prcm.bms.is.notification() then
on case prcm.get.subject()
case "my.event":
enable.commands("my_formcommand")
break
endcase
endif

and then you can fire events with prcm.notify("my.event") inside satellite whenever you need to enable your command. Consult with Programmers Guide for detailed information :)

Svidos29
25th May 2018, 16:40
hi, thanks, i've another question, in "my.event" i have to put my satellite session right?

thanks in advance

EDIT: FIne it works! Thanks a lot, for disable the command from passing to a valid record to a non-valid one, i used to create a new case named "not.my.event" where i use disable.commands(my.process)

real thanks again!!!!

giggty
28th May 2018, 09:37
Yes, basically for every disjunctive scenario you have to create a separate event by picking a unique string as an event subject. Then add a handler for it in recipient session, subscribe to it, and now you can prcm.notify() your observer about change of another sesion state (child session in your example).

Glad you sorted it out :)

AnuKass
7th August 2018, 10:50
hii all..
i'm new for LN ..
how to create MMT session and satellite session ???the what is meant by satellite session ???

giggty
9th August 2018, 09:51
Consider tisfc0101m100 (Production Orders) - this is the MMT Controller session, while tisfc0110m000, ticst0101m000, tisfc0516m000 and tisfc0105m000 are its satellites (child sessions). When you create a new session in ttadv2500m000 you need to specify its Window Type as Multi Main Table for the Controller (i. e. main) session and as List Window for satellites. Then in ttadv3110m000 you can attach child sessions to controller.
If you are using LN Studio there is a nice guide with pictures about MMT sessions in its help.