Cannot compare List with Number in ([Assigned...

Cannot compare List with Number in ([Assigned Operators] = [Emp Id].[Emp Id]) - Any alternative solutions for this please??

Dear Experts, We have developed an application where

we can change the equipment status โ€œWorkingโ€, โ€œAvailableโ€, โ€œStandbyโ€ etc., When the status is โ€œWorkingโ€, we may assign more than one operator for that particular equipment.

I have Equipment Status Table, where we can add an equipment first time, then just change the status.

I have Operator Directory, where I want to connect the equipment status as Operator Status. So that i can bring both Equipment and Operator Status. The problem is If i create a virtual column โ€œStatusโ€ in operator table by using this below formulaโ€ฆ =LOOKUP([_THISROW].[Emp Id], Equipment Status, Assigned Operators, Status) โ€ฆ i get below error message.

Cannot compare List with Number in ([Assigned Operators] = [Emp Id].[Emp Id]). How do i take the assigned operators to operator Directory.

Please help us out from this big obstacle as we almost there to complete this project. Our Management is welcomed this Concept.

0 15 2,406
15 REPLIES 15

Iโ€™m not 100% sure about your table structureโ€ฆ you have tables like Equipments, Equipments Status and Operator Directory, correct?

@Aleksi_Alkio Yesโ€ฆ Equipment directory and Operator Directory I have Equipment Directory Table, โ€œStatusโ€, โ€œAssigned Operatorsโ€, โ€œTill Dateโ€ are columns.

The Assigned Operators values are taken from โ€œOperator Directoryโ€ as Enumlist (in order to select more than one Operator)

Now, in my Operator Directory, I want to link the equipment status as Operator Status. So that i can bring both Equipment and Operator Status.

Somehow I managed to assign multiple operators by having a separate table called โ€œAssigned operatorsโ€. In this table โ€œEquipment Codeโ€, โ€œEmp Idโ€ and โ€œStatusโ€. Now I want to lookup this status and update in Operator Directory by Emp Id. The problem is i got the correct status by having virtual column and below formula. =LOOKUP([_THISROW].[Emp Id], Assigned Operators, Emp Id, Status)

But in some cases, i have to change operator status straightaway from Operator Directory. So i need to have a physical column of status, not a virtual column. So i created a physical column for status and update the same formula. BUT ITS NOT UPDATE THE STATUS.

What is wrong here? Please advise.

When you use a normal column for this purpose, the status doesnโ€™t change if you donโ€™t open and save the record. Thatโ€™s the main difference between normal and virtual column.

I did open and save the record. but it doesnโ€™t reflect the status. however, the virtual status does it.

Is the formula exactly the same?

@Aleksi_Alkio yesโ€ฆ exactly same

You can access our Application if you require further information

SNMEOperations-575724 Please we need your help in this regard

I believe in your case you canโ€™t read the status with the EnumList field. You could evaluate the โ€œEmp IDโ€ with the list, but it wonโ€™t give you correct result because itโ€™s possible the assigned operator is chosed more than once. You should find a relation between these two tables so you could identify the status. The reason is not the formula itself, itโ€™s the column structure.

Because [Assigned Operators] is an EnumList, you need to use the IN() function to see if [Emp Id] occurs in it. You cannot use LOOKUP() to do that; youโ€™ll need to use ANY(SELECT()) instead.

Change this:

=LOOKUP([_THISROW].[Emp Id], Equipment Status, Assigned Operators, Status)

to this:

=ANY(SELECT(Equipment Status[Status], IN([_THISROW].[Emp Id], [Assigned Operators])))

+Steve Coile thanks. By using this formulaโ€ฆ can I get the status?

@Sarens_Nass_Middle_E Yes, the formula will return the content of the [Status] column of the first row found in the Equipment Status table in which [EmpId] occurs in the rowโ€™s [Assigned Operators] list.

+Steve Coile This formula will give an answer, but it wonโ€™t work in this case because there are more records than just one where the expression evaluation is true. It will give a โ€œstatusโ€, but the status is not the correct one.

@Aleksi_Alkio True, but it produces the result intended by the LOOKUP() formula that produced the error.

+Steve Coile correct, the first row and that is causing the wrong status.

Top Labels in this Space