Canvas App: Incompatible variable types

By | March 29, 2020

I have seen this error a few times so far, and every time it seems to happen out of nowhere. My application used to work – I even recorded a video of how it was working the night before to share it with the client. Lucky me, since, when I opened it the next morning to do a demo, all my formulas were showing errors similar to the one below:

image

“Incompatible type. We can’t evaluate your formula because the context variable types are incompatible with the types of values in other places in your app.”

Looking at the list of variables, I noticed that CurrentContact is of the “Error” type:

image

Not that it was very useful, but, to make it somewhat worse, I also found a different screen where the error was a little more precise:

image

If you’ve seen it before, maybe you can leave me a note since I’d be really interested to know what’s happening there. At the moment, I only have a workaround which seems to help, but what bothers me is that it does require quite a bit of application refactoring. Basically, I have to rename the variable everywhere. Will this problem happen again later when my app is bigger and it takes longer to do the renaming?

In the example above, I started to change variable name, and I’ve noticed quickly that the error was gone. So, I tried renaming it back to the original, and it was still all good. However, I remember the same issue happened to me before, and I actually had to change the name of my variable on a few screens before the error was gone.

Anyway, so far so good. If you run into it, you may try the “renaming trick”. But, if you have a better solution, please let me know.

One thought on “Canvas App: Incompatible variable types

Leave a Reply

Your email address will not be published. Required fields are marked *