How to retrieve select value

 17 Replies
 0 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
Terry P
Veteran Member Send Private Message
Posts: 234
Veteran Member
I have a custom Portal Page that has a button that calls an IDA "select" for employee number (what happens when you click the drop down box next to an employee number on a form).

That works, it brings up the Select and Filter drill down, everything looks great. What I can't figure out is when the user makes a selection and control is returned to my Portal Page - how can I get the value of what they selected? I can't seem to find the correct javascript code in the Objects Viewer that returns that.

Any suggestions? 
David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member
See my Blog entries for a couple of options:
http://consultdavidw.blog...t-line-solution.html
http://consultdavidw.blog...line-solution-2.html
David Williams
Terry P
Veteran Member Send Private Message
Posts: 234
Veteran Member
Thanks for the idea David - but what I'm trying to do is retrieve the value from the drill down select, not from a row on the form.
David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member
Did you build your own custom drill down DME call or are you using Lawson's?
David Williams
Terry P
Veteran Member Send Private Message
Posts: 234
Veteran Member
I'm using Lawson's. I just added the following function which is invoked when they click a button. It works just fine, the select screen comes up just as if I had did a drop down on employee number from a form.

//*********************************************************************************
// If the user clicked the lookup employee button
//*********************************************************************************

function btn_LookEmp()
{
idaCall = "/servlet/ida?_STY=&_TYP=SL&_OUT=XML&_PDL=LAWAPP8&_SYS=HR&_KNB=H07&_FN=EMPLOYEE&_IN=EMPSET6&HU4=0&H20=GE&HCU=&01=2082&_RECSTOGET=27"

top.lawsonPortal.tabArea.tabs["PAGE"].clearNavlets();
top.lawsonPortal.drill.doSelect( window, "initializeFramework", idaCall)

return;
}
// *******************************************************************************
Terry P
Veteran Member Send Private Message
Posts: 234
Veteran Member
Any other suggestions here? When I opened a LIS support call with Lawson, the response was:

"Terry, after reviewing all of your information and consulting w/ another colleague of mine, this is really not supported. If you would like assistance from Lawson on this, I can certainly get you in touch w/ Lawson Professional Services (LPS) for further assistance."

You would think with the amount of money paid for support, they would be more helpful on answering "how to" questions without wanting to charge the second arm and a leg.
David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member
Try this - you can add a drop down which does the IDA call for you and will return the value to the field correctly.

http://consultdavidw.blog...wn-from-another.html
David Williams
Terry P
Veteran Member Send Private Message
Posts: 234
Veteran Member
Hmmmmm, I'll remember that for other applications. Unfortunately it won't work here because it's a Data Query object on a Portal Page, not a form. I'm trying to get the key values for the DME query and/or pass them to the Filter.
David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member
The only other thing I can think of is to add the IDA object to your page - pass the key fields to it from the employee selected - refresh your view - and then reference the object to get the values you want.
var objIDA = page.objects["ida0"];
David Williams
John Henley
Send Private Message
Posts: 3355
Have you played around with the callback function? I'd have to try it, but you should be able to create a module-level (i.e. shared across functions) JavaScript variable for the IDA (or as David suggests, putting an IDA on your page itself), and then in the callback function, examine that to find the drill return value.
Thanks for using the LawsonGuru.com forums!
John
Terry P
Veteran Member Send Private Message
Posts: 234
Veteran Member
I'll give that a try. I had not thought about using the IDA object (never had used it before).
Terry P
Veteran Member Send Private Message
Posts: 234
Veteran Member
The only other thing I can think of is to add the IDA object to your page - pass the key fields to it from the employee selected


This is where I'm hung up - how do I reference or get the "employee selected"?
Ragu Raghavan
Veteran Member Send Private Message
Posts: 477
Veteran Member
Terry and others, where do you see the usage/syntax like the ones you used ? I could not find them on the Lawson support site ? Is there a training class for this ?

"top.lawsonPortal.tabArea.tabs["PAGE"].clearNavlets();
top.lawsonPortal.drill.doSelect( window, "initializeFramework", idaCall) "

Thanks.

Ragu


Robert Spurr
Veteran Member Send Private Message
Posts: 130
Veteran Member
While I can't say this as a certainty but the control is nothing more than a fancy dropdown/list box and is that is the case the following link might be helpful (https://www.lawsonguru.co...butes-from-listbox/)
Ragu Raghavan
Veteran Member Send Private Message
Posts: 477
Veteran Member
Thanks Robert, but I am referring specifically to calling the drill servlet (what used to be IDA). The "Doc for developers: IOS API" does have some explanation of what is the call TYPE, Key Number etc. That I can follow. But after that, to actually bring up the drill-around screen, you need something like this statement

top.lawsonPortal.drill.doSelect( window, "initializeFramework", idaCall) "

In my case, I needed

top.lawsonPortal.drill.doDrill( window, "initializeFramework", idaCall) "
I found this in a posting on LawsonTalk.

Where is this documented ?



jamesraceson
Veteran Member Send Private Message
Posts: 52
Veteran Member
Ragu,

One of the few places that you will find something similar to this that is "documented" is inside of Design Studio itself. After you sign in, go to Tools -> Objects Viewer -> Objects Reference -> PORTAL -> Drill -> Methods -> doDrill. Unfortunately in regards to Design Studio, Lawson just gives out littles pieces to get you started, with little to no explanation, and then you are on your own. Only through testing, trial and error, and sites like this do you actually get any true, worthwhile data.
Ragu Raghavan
Veteran Member Send Private Message
Posts: 477
Veteran Member
Thanks.
Robert Spurr
Veteran Member Send Private Message
Posts: 130
Veteran Member
Well I can't answer that but in some cases seeing an example and working backwards works for me. In those cases I would drill on any inquired form that I'm familiar with than click crtl-alt-a and deconstruct the call. May or may not help just thought I would offer an alternative.