On order entry change the Customer Box to a Combo box that grabs values from the database
On order entry change the Customer Box to a Combo box that grabs values from the database
(OP)
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. http://i.imgur.com/S6pMKpK.png
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 http://i.imgur.com/0DoSFSL.png 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
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. http://i.imgur.com/S6pMKpK.png
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 http://i.imgur.com/0DoSFSL.png 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
RE: On order entry change the Customer Box to a Combo box that grabs values from the database
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: www.gainfocus.biz/exceladdin.html
RE: On order entry change the Customer Box to a Combo box that grabs values from the database
RE: On order entry change the Customer Box to a Combo box that grabs values from the database
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.
RE: On order entry change the Customer Box to a Combo box that grabs values from the database
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: www.gainfocus.biz/exceladdin.html