sunnydreams
Technical User
Software Used: VB 6
Database: SQL Server
PROBLEM DESC:
I have the following code as an example: (This code needs to work in a generic scenario also, I have just taken some example here like "Employeeid =123", but in general any Employeeid should work and cannot be hard coded)
If szSenderID = "sss" And dict_L11.Item("employeeIdQualifier") = "zz" And IsNumeric(Left(dict_L11.Item("employeeId"), 1)) = True Then
dict_L11.Item("employeeId") = "AB" & dict_L11.Item("employeeId")
When I execute this code, I get the following results:
IF Employeeid= 123 it gives result as "AB123" ----> Works as desired
if employeeid= 1g3 it gives result as "AB1g3" ----> Works as desired
if employeeid= g12 it gives result as "g12" ---------> PROBLEM AREA, PREFIX IS NOT GETTING ADDED here
IF employeeid =aa2 it gives result as "aa2" ----->Works as desired
DETAILED PROBLEM DESC:
I have a strange criteria that I am facing now. ( In this code for everything we will add a prefix "AB" )
Suppose if they provide employee ID : 123, then it should add prefix "AB " and it will become "AB123" ---> Works as desired
Suppose if they provide the employee id as "1g3", then also it should add a prefix "AB1g3" ---> Works as desired
Suppose if they provide the employee id as "g12" then also it should add a prefix "ABg12" ---> THIS IS THE STEP IT IS NOT WORKING
Suppose if they provide an employee id as "aa2", then it should not add any prefix to the result and result should be "aa2" ----> Works as desired.
WHAT I AM LOOKING FOR:
What changes should I make to the code condition in order for the 3rd criteria to work?
Can u pls help me.
Thx in advance
Database: SQL Server
PROBLEM DESC:
I have the following code as an example: (This code needs to work in a generic scenario also, I have just taken some example here like "Employeeid =123", but in general any Employeeid should work and cannot be hard coded)
If szSenderID = "sss" And dict_L11.Item("employeeIdQualifier") = "zz" And IsNumeric(Left(dict_L11.Item("employeeId"), 1)) = True Then
dict_L11.Item("employeeId") = "AB" & dict_L11.Item("employeeId")
When I execute this code, I get the following results:
IF Employeeid= 123 it gives result as "AB123" ----> Works as desired
if employeeid= 1g3 it gives result as "AB1g3" ----> Works as desired
if employeeid= g12 it gives result as "g12" ---------> PROBLEM AREA, PREFIX IS NOT GETTING ADDED here
IF employeeid =aa2 it gives result as "aa2" ----->Works as desired
DETAILED PROBLEM DESC:
I have a strange criteria that I am facing now. ( In this code for everything we will add a prefix "AB" )
Suppose if they provide employee ID : 123, then it should add prefix "AB " and it will become "AB123" ---> Works as desired
Suppose if they provide the employee id as "1g3", then also it should add a prefix "AB1g3" ---> Works as desired
Suppose if they provide the employee id as "g12" then also it should add a prefix "ABg12" ---> THIS IS THE STEP IT IS NOT WORKING
Suppose if they provide an employee id as "aa2", then it should not add any prefix to the result and result should be "aa2" ----> Works as desired.
WHAT I AM LOOKING FOR:
What changes should I make to the code condition in order for the 3rd criteria to work?
Can u pls help me.
Thx in advance