Hi All
Iam building a form for a requirement I have but Iam not quiet sure how to resolve this.
I have a SQL table called Employees that has all the company Employee details like the Site ,Name ,Job title and Department .
I want to be able to punch in my employee number BA1234 on the first field called Employee Number (text ) field nvarchar data type.
It will then populate Site
Job title
Department
I had managed using cascading dropdowns but the users don't want to scroll the list looking for an Employee number they want to punch in the number and based on the information in the database it will populate the site ,the job title ,the department of that employee.
Solved! Go to Solution.
Create an Edit Form with the DATASOURCE being your Employees table. Then make the Item property this code:
LookUp(Employees, ‘Employee Number’ = TextInput_EmployeeNumber.Text)
Note: you should place the Employee Number Text Input outside of the Edit form
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
I suggest if possible to replace the dropdowns with Textboxes and proceed as follows:
Job title
LookUp(Employees , employeenumber=EmployeesNoTextbox.Text,Jobtitle)
Department
LookUp(Employees , employeenumber=EmployeesNoTextbox.Text,Department)
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
#1 Please share a screenshot of the error message you are getting. This is always helpful when problem solving.
#2 You said you put the formula in the Items property of the form. However, the property is called Item which makes me wonder if you put this code in the gallery by mistake.
#3 Make sure the the Employee Number text input is outside of the form like my instructions said.
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Create an Edit Form with the DATASOURCE being your Employees table. Then make the Item property this code:
LookUp(Employees, ‘Employee Number’ = TextInput_EmployeeNumber.Text)
Note: you should place the Employee Number Text Input outside of the Edit form
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
I suggest if possible to replace the dropdowns with Textboxes and proceed as follows:
Job title
LookUp(Employees , employeenumber=EmployeesNoTextbox.Text,Jobtitle)
Department
LookUp(Employees , employeenumber=EmployeesNoTextbox.Text,Department)
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Hi
Iam currently testing in my test app the table is called (Advanced Cleaning staff ).
The Employee is the (employee number) ,I have created a an EditForm
When I put the formula in the items property Iam getting an error
LookUp('[rp].[AdvancedCleaningStaff]',Employee=TextInput1_Employee.Text)
#1 Please share a screenshot of the error message you are getting. This is always helpful when problem solving.
#2 You said you put the formula in the Items property of the form. However, the property is called Item which makes me wonder if you put this code in the gallery by mistake.
#3 Make sure the the Employee Number text input is outside of the form like my instructions said.
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Hi
I have just read your Note and have corrected my self.
If employee is the number in your table as you said, what column do you want to see in the Textbox
LookUp('[rp].[AdvancedCleaningStaff]',Employee=TextInput1_Employee.Text,ColumnToSee)
Example
LookUp('[rp].[AdvancedCleaningStaff]',Employee=TextInput1_Employee.Text,JobTitle)
Dont repeat Employee twice as you have indicated in the other formula
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
my apologies @rmaziws you really helped thanks
User | Count |
---|---|
122 | |
87 | |
86 | |
75 | |
67 |
User | Count |
---|---|
214 | |
180 | |
137 | |
96 | |
83 |