Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On order entry change the Customer Box to a Combo box that grabs values from the database

Status
Not open for further replies.

jdbrande

Programmer
May 7, 2013
13
US
Hi,

I am working with the order entry screen, and I wanted to make the Customer Entry like the Type (how you type O and Order comes up)
So I change the customer field to look like this.
1st question, Does it automatically grab the customers from the cicmpy database?

If it did I couldn't figure it out so I went to this screen and checked allow additional input... I left the screen and went back to it but it didn't save the check mark. SO I had to add a dummy variable named ALL. I then in the flex code did

set the datasource
sql = select cmp_name from cicmpy where cmp_type = 'C'
loop through the records
customer.add(rs("cmp_name"))
next

However when I would test it twice the items wouldn't clear, and there isn't a customer.items.clear.
SO I guess the second question is how do you clear a combobox in flex?

THe third question is how do you get it to automatically select when you type like the Type does (type O and Order comes Up)?

Basically I am trying to get the customer to be an autocomplete textbox so when they type it automatically fills in the ones that are similar

Thanks
 
If you want the order type to always be O, then change this with screen designer not with code. Remove the other options from the drop down list. I am not sure this is possible with code but it definitely doable with screen designer.

To clear a combobox in flex, it is a simple "comboboxname.clear". However the customer fiekd is not a combobox. Are you adding a custom field on your screen? If so what are you attempting to do with it?

In regards to the rest of your post I am confused. You must either key in the customer or search for it. Yes it comes from the cicmpy table. But you don't need to write any code or do any screen modifications to make this work - it works fine already. What exactly are you trying to accomplish here that is not already happening to your satisfaction?

Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools:
 
I am trying to make the customer field a combo box. The customer is used to quick books where you enter the customer name, what I want to do is populate the customer field with the customer names and when they select one it grabs the correct number from the cicmpy table
 
Its been a really long time. Buy I believe I did this in progression many years ago. I think I had to use a VBA only field before the customer field.
This Field was a combobox, and on keypress it would add values to the combobox with select top x percent where cust_name starts with "keyspressed", the next letter in the name would repeat the process, we didn't want to populate with all customers as they had 30,000+. When customer was selected, the "Cus No" field that is naturally on the screen was automatically populated based on the VBA only field selection. I think we had the VBA Only field in front of the "Cus No" field. I remember it was someone that was a QuickBooks junkie and we did this on the customer number fields and item number fields.
Perhaps this may help.
 
I am fairly certain you cannot make this field a combobox.

Have you shown them the search button? They do not have to key in a customer number, they look it up by name, the search displays a subset of customer data depending on what they entered in the search and they select the one they want. Is this really undesirable for some reason?

If I had to so this, I would create a user form that displays on the customer number got focus event. On this user form have an entry field and a grid. Have the grid display the customers with a SQL statement, which changes every time they key in a letter. Then give them the ability to select from that list and return the proper value back to the OE0101 screen. However I am sure this would be slower than the built in search.

Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top