Skip to main content
eddym0001
Known Participant
Dec 9, 2021 12:30 PM UTC
Question

Could not cast from User to Number

Hello,

I have this error in an Interface and I don't  how to solve:

Se ha producido un error en la expresión a!forEach() durante la iteración 1: Error de evaluación de expresión at function 'tointeger' [line 118]: Could not cast from User to Number (Integer)

Could you help me , please?

    4 replies

    andrewh0007
    Inspiring
    Dec 9, 2021 12:32 PM UTC

    Could be many things. What's your code?

    gayathris111098
    Inspiring
    Dec 9, 2021 12:56 PM UTC

    agree with andrewh0007. what is the code?

    gayathris111098
    Inspiring
    Dec 9, 2021 12:55 PM UTC

    Adding tostring before user value may fix this issue,  tointeger(tostring(loggedInUser()))

    But is there any specific reason for coverting the user to integer?

    stefanhelzle0001
    Brainy
    Dec 9, 2021 1:24 PM UTC

    Technically a user cannot be represented as an integer. Regardless of what you do.