Forum Discussion
bhelou
6 years agoResponsive Resident
expressions that yield variant data-type
Hello Community , i made this formula and its makinf # error ( expressions that yeild variant data-type cannot be used to define calculated columns Employee_Name = IF(Employee_ID_Name[looku...
- 6 years ago
Hi bhelou ,
I guess the column of EMPLOYEE_ID is number type and the lookup_Name is the text type. Your expression returns either number or text. But the data in calculated column need to be the same type. You could try using the function of FORMAT to return the EMPLOYEE_ID to text.
Employee_Name = IF ( Employee_ID_Name[lookup_Name] = "", FORMAT ( Employee_ID_Name[EMPLOYEE_ID], "" ), Employee_ID_Name[lookup_Name] )
v-xuding-msft
6 years agoCommunity Support
Hi bhelou ,
I guess the column of EMPLOYEE_ID is number type and the lookup_Name is the text type. Your expression returns either number or text. But the data in calculated column need to be the same type. You could try using the function of FORMAT to return the EMPLOYEE_ID to text.
Employee_Name =
IF (
Employee_ID_Name[lookup_Name] = "",
FORMAT ( Employee_ID_Name[EMPLOYEE_ID], "" ),
Employee_ID_Name[lookup_Name]
)