Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 29 JUN 2012 05:36:41PM jackie jones wrote:

This is just to say how Cool the Type Ahead Box is. Thousands of Customers, no problem!

Really neat.

Also, cool date picker!

Really great stuff.


At 01 JUL 2012 04:43PM jackie jones wrote:

I don't understand the Type ahead box after all.

I can get it to select from all those customers, but in order for it to update the Customer ID field with the associated it, I have to click out of the field then click back in, then back out, then it shows the Customer ID.

O4WTABOX("",40,"SELCUST","0",NAMES.LIST,CODES.LIST,"","","","SELCUST","")

O4WQualifyEvent("SELCUST","LOSTFOCUS","O4WTABOX")

Then a field for the Cust:

O4WTextbox("","","","CUST","CUST")

In the lostfocus,

SELCUST=O4WGetValue("SELCUST")

Then find the associated code from a for next loop (and I think this is where its wrong but dont know what to do about it) then update the CUST field with the Selcustid.

So the user starts typing and arrows down and selects a name then hits enter.

I thought the lostfocus would find the customer ID and put it in the Cust field

and it does, but only after they move the cursor back and forth between the fields twice.

Thanks


At 02 JUL 2012 05:28PM bshumsky wrote:

I don't understand the Type ahead box after all.

I can get it to select from all those customers, but in order for it to update the Customer ID field with the associated it, I have to click out of the field then click back in, then back out, then it shows the Customer ID.

O4WTABOX("",40,"SELCUST","0",NAMES.LIST,CODES.LIST,"","","","SELCUST","")

O4WQualifyEvent("SELCUST","LOSTFOCUS","O4WTABOX")

Then a field for the Cust:

O4WTextbox("","","","CUST","CUST")

In the lostfocus,

SELCUST=O4WGetValue("SELCUST")

Then find the associated code from a for next loop (and I think this is where its wrong but dont know what to do about it) then update the CUST field with the Selcustid.

So the user starts typing and arrows down and selects a name then hits enter.

I thought the lostfocus would find the customer ID and put it in the Cust field

and it does, but only after they move the cursor back and forth between the fields twice.

Thanks

Hi, Jackie. Sorry, I'm a little confused over what you're trying to accomplish.

What do you want to have happen when the control loses focus? It should already be displaying the customer name in the type-ahead box; do you need to get the customer number for something at that point as well?

Thanks,

- Bryan Shumsky

Revelation Software, Inc.


At 02 JUL 2012 05:40PM jackie jones wrote:

Thanks Bryan, Yes we want to get the Customer Code and show it on another field on the screen.

We need the Customer Code to appear on the CUST field after the user chooses the name, then will go to part two of the screen. After we get the Customer Code we'll have to read the Customer Master to get a list of the customer's contacts phones and emails and show those so the user can select the contact.

Thanks, I'm sorry I have to ask so many questions. I hope I'm not repeating the same question without knowing it.


At 02 JUL 2012 11:02PM bshumsky wrote:

Thanks Bryan, Yes we want to get the Customer Code and show it on another field on the screen.

We need the Customer Code to appear on the CUST field after the user chooses the name, then will go to part two of the screen. After we get the Customer Code we'll have to read the Customer Master to get a list of the customer's contacts phones and emails and show those so the user can select the contact.

Thanks, I'm sorry I have to ask so many questions. I hope I'm not repeating the same question without knowing it.

Hi, Jackie. No problem - if you've got a question, then probably other people do (or will) as well.

The typeahead input box is a special beastie - it's not a regular textbox, or a regular control at all. It uses a "plugin" to provide the functionality we see. And so getting its value is a little bit different from most other controls.

You can call O4WGetValue("NameOfControl") to get the value that's in the typeahead box, as you've done - for example, it'll retrieve the customer name. But if you want to get the code associated with that name, you have to call O4WGetValue("NameOfControl_code"). So in your example, you'd say something like this:

CustomerName = O4WGetValue("SELCUST")

CustomerID = O4WGetValue("SELCUST_code")

And then you can use the value returned in CustomerID for the rest of your processing. I don't know why the whole "double-tab-lost-focus-got-focus" process worked as well…but I think we'll just chalk that one up to "unexpected behavior."

So go ahead and give that a try, and let me know how that works?

Hope that helps,

- Bryan Shumsky

Revelation Software, Inc.


At 03 JUL 2012 12:25PM jackie jones wrote:

Yes. that works! Fabulous! Thanks!

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/1337d90b0004f8b0628bedc00.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1