Getting Error while adding blocks or performing any action

image

This is the error I am encountering while performing any function relation to blocks.

Anyone going over the same problem or has a fix to it?

Let me know.

@kkk2 Thanks for posting. Can you please share a link to your project with us so that we can get more context as to why this may be happening? It is always best to share images of your blocks or a link to your project when requesting help here.

Thank you!

There’s always a direct cause for this and that specific error will usually appear when connecting two specific blocks (and will go away when disconnecting them). Do you notice that happening? It’s often related to Data Source blocks or set variable blocks. If not, then as @conroy suggested, having a link the project is necessary to determine the problem.

I got it fixed somehow. the get property of object was the root cause ( whenever I added that block in if else, it caused an error ).

I was using if, elseif, else for the code block below. but seems like that was the issue for some reason.

So I changed it to using 3 times if for checking.

This did solve my problem.

1 Like

Glad you got it working! If you need to speed up your code, you could:

  1. use if/elseif blocks instead of multiple if blocks
  2. assign stored variable rowid to an app variable once and then use the app variable everywhere you have the stored variable.

I don’t really know if you saw the reply clearly lol.
I used multiple ifs because adding the get property of object in if else was causing the error.
after switching to multiple ifs, the error vanished.

also I am using stored variable because its the main identifier of the account. I want to keep it for ever so yeah.

Sorry, I did miss that! Skipped right to the screenshot.

But just so you know, accessing stored variables is a slow process. Much slower than app variables. If speed isn’t an issue, you can ignore that. But if it is, then you transfer the values of the stored variables temporarily to app variables and use the app variables throughout your code. Then, any time the app variable value changes, you save it back to the stored variable. That way, you save the values permanently but speed up the project.

Thanks for the info!

Will implement it.