Workflow Analyzer is Stating a Used Variable is Unused

Hello all, please take a look at the following image:

I ran a workflow analyzer for my project and most errors were outputted correctly, and I was able to resolve them. However, even after reboot of studio, this one error keeps populating.

Basically, I have a String variable “CoveragesText”, which is a String outputted by a Get Full Text activity. I use this later to compare against a known value in another string (in_CurrentInsurance). However, the analyzer keeps saying the variable isn’t used…is this an error with Studio, or am I missing something?

Studio version 2021.10.4

EDIT: I have already tried look through different scopes in the XAML, no such luck

Hi @jonathan.traeger

Check also in all the scopes and see whether you have another variable named like this?


Sudharsan -
Thanks for the reply. That’s the first thing I checked, should have mentioned it. Unfortunately, that didn’t seem to be the problem.

Oh okay , Then its weird

1 Like


Can you please remove the solution from the above post? That is not a correct one

Done, apologies

No worries @jonathan.traeger :smile:

We had some issues with variables not being identified properly in some inners scopes like else/if or validate activities. This is supposed to be fixed using the latest 23.2 build that just got released.

This is a known issue I reported quite a while ago.

It seems the analyzer doesn’t see variable references when they’re in an expression. It will also mistakenly see a package/dependency as unused if the only reference is in an expression.

For this reason I never use the “Remove Unused” button - I always use the analyzer and then manually investigate any variables, dependencies, etc that it reports are unused.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.