Expresion con Contains que me da error

Buenas,


Tengo esto con esta expresión:

Y me esta dando este error:
Argument ‘Condition’: BC30518: Overload resolution failed because no accessible ‘Contains’ can be called with these arguments:

y no sé como arreglarlo para que me funcione, ya que lo que yo quiero es identificar una columna de la DT que contiene el año que es igual al que tengo en el excel

Gracias.

@lily.RPA

Hi @lily.RPA

Try this:

currentItem.ColumnName.ToString().Contains(strNaio)

Regards

lo acabo de probar y me da error

Hi @lily.RPA

What is the datatype of strNaio it is String only Right?

Regards

me da error, lo acabo de probar

@lily.RPA

Is it giving you the same exception or you will get another

Sí, es un String el tipo de dato

@lily.RPA

Can you try to delete the for each activity and reinitialize it once, because it is working in my pc

Hi @lily.RPA

It’s working at my end

Could delete and reinitialize the activity.

Try to change the Scope of strNaio to Main Sequence.

Regards

Es el mismo error, que no permite convertir boolean a String, ni tampoco boolean a char

@lily.RPA

Can you try to update UiPath.System.Activities package

@lily.RPA

Check your strAnio datatype run this in Debug mode and take the screenshot where you get the exception and put it in here

ya lo solucione, estaba repetida la variable,mil gracias a todos

Hi @lily.RPA

Hope your query is resolved. If yes, please mark my post as solution to close the loop or if you have any queries, I’m happy to help.

Regards

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.