Warning: Variable is never used

I am in the process of converting an application to 3.1.1 and I get a lot of Variable is never used warnings. But sometime one can not avoid not using a variable. Even Mendix modules have them (like ASu_CheckModelAndTemplates in the ExcelImporter). Can these warnings be switched off individually? These warnings clutter the warnings that are interesting and should be taken care off. Or am I missing something and could this warning be avoided.
4 answers


  • Microflow called from an event in the domain model get the entity as parameter. Sometimes you don't use it.

  • Microflow called for attribute get the entity. Sometimes we use $currentUser to add kind of a preference attribute (like a user dependent show_debug tab). Does not use the entity and hence the warning.

  • Lots of times the result of a generic microflow is not used. Re-using a microflow might need a returned boolean, for example in a validation before commit. Using this one somewhere else leads to the warning.


We make applications which after delivery are maintained by other partners. When we transfer the project to a partner we want to tranfer a clean project. That also means no warning. I completely agree with the posts above. A clean project doesn't have warning.

I got another warning which is unappropriated:

"Empty form title of target form. Either set the form title of the target form or override it here. [Dutch, Netherlands] Action activity 'Show 'Public_Home''"

We got a lot of warnings like this one. We got our own titles with custom styling so we don't want the default title. At this point we have 75+ warning only because we don't use the default title.

Again the request, make warnings hide-able.



You are right that most of the times they do point to model errors. But take for instance the email module. Now every time you use the 'use me' microflows and fill the paramaters you get the above warning while nothing is wrong. I only call a submicroflow with parameters so that mail will be send and continue my microflow. And specially with modules from the app store it is for the novice user I think confusing that he is confronted with lots of warnings and probably do not know what to do with them. Feature request to be able to switch them off individually?


It should indeed be possible to get rid of all warnings.

Please submit a support ticket including a test project that contains a warning that can not be eliminated and we will have a look at it.