deviceofmisery
28th December 2010, 06:38
Hello,
I want to call subsession tcmcs0547s000 from session tipcs2101m000 fo get the next free project number for next project.
When I start the subsession manually I need to klick with the mouse on the type of project i want to generate and then klick the OK Button. After this the subsessions closes and in the mainsession I can see the new project number.
How can I automate this if I know the type of project (Milling, Series 2 --> can see in the attached file).
I know that i need to start with:
stpapi.handle.subproc("tipcs2101m000 ","tcmcs0547s000", "add")
stpapi.zoom.option("tipcs2101m000 ","tcmcs0547s000", err1)
but after that I don't know anz further.
anybody can help?
Merry Christmas,
deviceofmisery
croezen
29th December 2010, 16:40
I use stpapi to make an order and then extract the number, maybe its of use to you.
there is a lot of docu on these stpapi functions on Baanboard, just look for it.
stpapi.put.field("tipcs5130m000", "tipcs530.oqan", "1" )
stpapi.put.field("tipcs5130m000", "tipcs530.pddt", str$(date.num()))
stpapi.put.field("tipcs5130m000", "tipcs530.osta", str$(etol(tcorsa.release)))
stpapi.insert("tipcs5130m000", true, error.msg)
stpapi.get.field("tipcs5130m000", "tipcs530.orno", l.orno)
stpapi.end.session("tipcs5130m000")
deviceofmisery
12th January 2011, 03:12
ok, thanks.
but where can I find the field names for the subsession? In which field do I have to put which value to get (e.g.) the Series 2, Milling selected?
In a normal session I would use the "help button" to get the neccessary field names, but in that subsession (as you can see) there is no help button.
NirajKakodkar
12th January 2011, 07:01
You can either press <CNTR> <SHIFT> "7" to get the entire XML data of the form or go to Maintain forms and get the fields.
Best Regards,
Niraj Kakodkar
deviceofmisery
13th January 2011, 02:57
Hello Niraj Kakodkar,
<CNTR> <SHIFT> "7" do not work. When i press the buttons nothing happens!
and what do you mean by 'go to Maintain forms and get the fields.'?
Thanks!
NirajKakodkar
13th January 2011, 05:33
Hello,
1. Click on the form (Have the focus on the FORM), and then click <CTRL><SHIFT>"7", this should open your "ie" with XML data (Baan IV) and a XML tree dialogue window(BaaN LN) . In case your "ie" is not getting fired the XML file is created in C:\Program Files\Baan\Baan IV\tmp\ltmpxxxxxxxxx
where xxxxxxxx will be some temporary number. You can sort the files according to date/time and get the file.
2. What I mean by "Maintain forms" is (Tools -> Session -> Forms)
ttadv3100s000 (subsession of ttadv2100m000)
deviceofmisery
14th January 2011, 04:22
Hello,
1. Don't work. Form is focused and i push the buttons but no file is created in the folder you told me! can i do anything else?
2. In the menu strip: Tools --> ... there is now Sessions in my Worktop! Am i wrong somehow?
NirajKakodkar
14th January 2011, 06:14
Run the session "ttadv2100m000" (Assuming you are using Baan IV), now search for your session number (<CTRL> F), go to form 2, there is button named "FORM", click on it "ttadv3100s000" subsession will open (This is maintain forms session), Click on the button "Edit Form" or "Display Form", the form will open in Editor (Black screen), now click on the fields you want and a popup with field details will appear.
mark_h
14th January 2011, 16:20
Just a note - on most baan standard sessions you can click the help button and then click on the field. This usually, but not always, pops up the help on the field and displays the form field name.
deviceofmisery
17th January 2011, 03:06
Thanks NirajKakodkar,
yes, I have baan IV, but I couldn't even find the session ttadv2100m000. Maybe I do not have enought rights to open that session?
mark_h
17th January 2011, 16:04
Do you try using program run for ttadv2100m000? I think that would tell you if you did not have permissions. On my system it is under tools/application development/sessions.