Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Unexpected error: Operation is not valid due to the current state of the object.

Hi Team,

 

I am getting this error "Unexpected error: Operation is not valid due to the current state of the object".

 

What am I doing?

1. we created a function which needs 2 parameters - 1st parameter is Jira API URL & 2nd parameter is Project Key both have type = text

2. Now we have a table that contains 2 columns - 1st column is JIRA API and 2nd columns is ProjectKey. both have type = text 

3. Now we call the function and pass the column values as parameter but it gives above error.

4. So now instead of column values we tried passing the values Hardcoded values and now it returns a table - means it is working.

5. Why it is not working we pass the column name as parameter to the function?

6. We need this as we have to call this function for each row of that table. 

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi, 

     

    Finally, I found the solution to this issue.

    for example: below is my function

    fn_function = (a as number) =>

    let 

     a = a 

    in 

     

    now here since on both the side we have the same variable name. it gives the error. so I changed the function to below:

    fn_function = (b as number) =>

    let 

     a = b 

    in 

     

    then the issue got solved.

     

     

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous 

    Glad you found the solution yourself. And Thank you for share it.😀

     

     

    Paul Zheng _ Community Support Team

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, 

     

    Finally, I found the solution to this issue.

    for example: below is my function

    fn_function = (a as number) =>

    let 

     a = a 

    in 

     

    now here since on both the side we have the same variable name. it gives the error. so I changed the function to below:

    fn_function = (b as number) =>

    let 

     a = b 

    in 

     

    then the issue got solved.