Cannot compare List with Text in ([_ComputedKey]

I have first table with column Number(Enum) Tipo (Enum), Concepto (Enum) and Descripcion (Enum), I can save information in this table with no problems.

I have second table with column Number(Enum List) tipo (Enum List) and valid if is Select(Table 1[Tipo], [Number]=[_thisrow].[Number]) and this is ok

In the second table Column Concepto (Enum List) and valid if is Select(Table 1[Concepto], [Number]=[_thisrow].[Number], [Tipo]=[_thisrow].[Tipo])) and we have error Cannot compare List with Text in ([_ComputedKey])

0 11 9,541
  • UX
11 REPLIES 11

i use IN([Tipo]=[_thisrow].[Tipo]) and we have the same error

Youโ€™re using IN() wrong, and = wrong.

If you want to see if a value occurs in a list (or an EnumList), you should use the IN() function.

For the Valid If expression for the Concepto column, you appear to be trying to see if the Number column value from the Table 1 table is contained in the EnumList of the Number column value of this row of Table 2. The subexpression you used was:

[Number]=[_thisrow].[Number]

[Number] refers to the Number column value of a row in Table 1, which is an Enum value. [_thisrow].[Number] refers to the Number column value of the current row in Table 2, which is an EnumList value. You cannot compare a non-list ([Number]) directly to a list ([_thisrow].[Number]) using the = operator. Instead, to find whether the value from [Number] occurs in the list in [_thisrow].[Number], use this:

IN([Number], [_thisrow].[Number])

The same applies for Tipo. This:

[Tipo]=[_thisrow].[Tipo]

should be this:

IN([Tipo], [_thisrow].[Tipo])

I also notice that your SELECT() expression has two conditions (one for Number and one for Tipo), but the two conditions are not tied together with AND() or OR(). As a result, AppSheet will misinterpret them and give you very confusing results. My assumption is you only want SELECT() to match rows that match both conditions. If so, you should also use AND().

So your entire SELECT() expression should be:

Select(Table 1[Concepto], AND(IN([Number], [_thisrow].[Number]), IN([Tipo], [_thisrow].[Tipo])))

See also:



Good Evening sir,
I am trying to use the same particular but couldn't able to get the output kindly help me,

"" Error message"" -  Parameter 2 of function IN is of the wrong type

Production[Production] = text

Production[Quanity] = Number

Product[
Formula in Virtual column (list, type number)


SELECT(Production[Quantity],AND([Date] >= [_THISROW].[Date From],[Date] < [_THISROW].[Date To]),IN(Production[Production],[_Thisrow].[Product]) )

 

 

@Steve sir, I believe you can help with this, Thank you in advance

You said it yourself, Production[Production] = text and you are trying to compare it with [Product] (list, type number). You can't expect to find a text value in a list of numbers.

Thank you very much for the reply sir

 

Your IN() statement is wrong. IN() has two arguments, the first should be the item to look for in a list, and the second is the list. You've put them in the wrong order. 

IN(
  [_ThisRow].[Product],
  Production[Production]
)

IN() | AppSheet Help Center  

Hola, viendo las columnas entiendo que hablas espaรฑol.

Parece que tu columna key ha sido generada por appsheet. Cuando haces un SELECT necesitas apuntar a la columna key. Puede ser este el problema?

Thanks for your help, I did it

Regards

I am having the same issue and I am scratching my head as this should be working:

SUM(Select(Line Items[Total],[_THISROW].[#]=Line Items[Project ID]))

Cannot compare Text with List in ([_THISROW].[#] = Line Items[Project ID])

Top Labels in this Space