# Agent requirement, unable to compare agent property provided by Path Exists property collector with project variable? 1.9.2.464

**URL:** <https://www.finalbuilder.com/forums/t/agent-requirement-unable-to-compare-agent-property-provided-by-path-exists-property-collector-with-project-variable-1-9-2-464/6935>\
**Category:** Discussion\
**Created:** [November 23, 2020, 5:42pm UTC](https://www.finalbuilder.com/forums/t/agent-requirement-unable-to-compare-agent-property-provided-by-path-exists-property-collector-with-project-variable-1-9-2-464/6935 "2020-11-23T17:42:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkwalker](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/b/c0e974/32.png) [@bkwalker](https://www.finalbuilder.com/forums/u/bkwalker)\
**Post date:** [November 23, 2020, 5:42pm UTC](https://www.finalbuilder.com/forums/t/agent-requirement-unable-to-compare-agent-property-provided-by-path-exists-property-collector-with-project-variable-1-9-2-464/6935/1 "2020-11-23T17:42:45Z")

</div>

I’m using a PathExists properly collector to track agents that have a particular path present. The agents properties seem to work, the value is True when I view the agent.

As there is no boolean project variable data type, I tried Text and Numeric and in both cases when I have an Agent Requirement for a stage based on comparing a project variable with the property provided by 'Path Exists Plugin" the build pauses waiting for agent and shows that the requirement

“could not be evaluated as [project var] and [agent property] are different types.”

Any fix/workaround? I checked .484 notes and didn’t see anything relevant.

---

<div class="post-metadata">

**Author:** ![bkwalker](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/b/c0e974/32.png) [@bkwalker](https://www.finalbuilder.com/forums/u/bkwalker)\
**Post date:** [November 23, 2020, 7:18pm UTC](https://www.finalbuilder.com/forums/t/agent-requirement-unable-to-compare-agent-property-provided-by-path-exists-property-collector-with-project-variable-1-9-2-464/6935/2 "2020-11-23T19:18:33Z")

</div>

I just tried $Utils.GetBoolean([my project variable])$ compared to the agent property, and that errors in the same way. So it’s acting like the agent property isn’t a boolean, string or number…

Also tried .ToString().ToUpper() on the agent property, that doesn’t work either.

I’m starting to think this might be a bug?

---

<div class="post-metadata">

**Author:** ![bkwalker](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/b/c0e974/32.png) [@bkwalker](https://www.finalbuilder.com/forums/u/bkwalker)\
**Post date:** [November 23, 2020, 10:47pm UTC](https://www.finalbuilder.com/forums/t/agent-requirement-unable-to-compare-agent-property-provided-by-path-exists-property-collector-with-project-variable-1-9-2-464/6935/3 "2020-11-23T22:47:28Z")

</div>

FYI: I worked about this by adding a registry value and corresponding property collector. Had to set this on each agent so I can tell whether the software in question is installed or not. It works, but seems like much more hassle.

---

<div class="post-metadata">

**Author:** ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)\
**Post date:** [November 23, 2020, 10:54pm UTC](https://www.finalbuilder.com/forums/t/agent-requirement-unable-to-compare-agent-property-provided-by-path-exists-property-collector-with-project-variable-1-9-2-464/6935/4 "2020-11-23T22:54:57Z")

</div>

Hi Brenden,

What is the agent requirement expression that you used? I just did a test with the following property collector.

![image](https://www.finalbuilder.com/forums/uploads/default/original/2X/2/2a9c459d5e99ae3409846b8a3a650c592044ed71.png)

I created the following project-level variable:

![image](https://www.finalbuilder.com/forums/uploads/default/original/2X/e/e69f36b09c9f3a106852bc64ff6dd05b2fb17644.png)

Then I added this agent requirement to my configuration stage:

 ![image](https://www.finalbuilder.com/forums/uploads/default/original/2X/c/cf8973a51f550b88460f5310979caeb188ed480e.png)

When I created the path `I:\temp\pathtest` on the agent and started a build, it ran successfully.

---

<div class="post-metadata">

**Author:** ![bkwalker](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/b/c0e974/32.png) [@bkwalker](https://www.finalbuilder.com/forums/u/bkwalker)\
**Post date:** [November 23, 2020, 11:20pm UTC](https://www.finalbuilder.com/forums/t/agent-requirement-unable-to-compare-agent-property-provided-by-path-exists-property-collector-with-project-variable-1-9-2-464/6935/5 "2020-11-23T23:20:06Z")

</div>

I just re-tested with a fresh project, same result. I also upgraded to 1.9.2.484 prior to this test.

Here’s my property collector:  
 ![Untitled](https://www.finalbuilder.com/forums/uploads/default/original/2X/b/b570fc00bab3ed47116455dd35165cb9411194b0.png)

And project variable:  
 ![Untitled2](https://www.finalbuilder.com/forums/uploads/default/original/2X/e/e9e145460647727dda9a56faa15164047c17a0c0.png)

Agent Requirement in stage options. NOTE: I tried reversing the test variables, with agent property on left… same result:

 ![Untitled3](https://www.finalbuilder.com/forums/uploads/default/original/2X/b/bb51c15606b3cae1f63005e78f5e08b100b60367.png)

I verified that I have 2 agents with Vendor.RemObjects.PathExists as True and one agent with False. Build ends up stuck with this message in the details:

 ![Untitled1](https://www.finalbuilder.com/forums/uploads/default/original/2X/4/49523962678496773974dfd3027940249fcfdb33.png)

---

<div class="post-metadata">

**Author:** ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)\
**Post date:** [November 23, 2020, 11:32pm UTC](https://www.finalbuilder.com/forums/t/agent-requirement-unable-to-compare-agent-property-provided-by-path-exists-property-collector-with-project-variable-1-9-2-464/6935/6 "2020-11-23T23:32:58Z")

</div>

Change `$Agent.Vendor.RemObjects.PathExists$` to `$Agent.Vendor.RemObjects.PathExists.Exists$`.

`$Agent.Vendor.RemObjects.PathExists$` is an object and does not have a value on its own. You need to specify the `.Exists` property.

We can see that this is easy to miss and, as this object only has one property, we will make the `Exists` property the default if no property is provided. We’ll do this for the next version.

---

<div class="post-metadata">

**Author:** ![bkwalker](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/b/c0e974/32.png) [@bkwalker](https://www.finalbuilder.com/forums/u/bkwalker)\
**Post date:** [November 23, 2020, 11:36pm UTC](https://www.finalbuilder.com/forums/t/agent-requirement-unable-to-compare-agent-property-provided-by-path-exists-property-collector-with-project-variable-1-9-2-464/6935/7 "2020-11-23T23:36:09Z")

</div>

I thought I tried that once before, but must have been in the wrong context or one of the other things I tried.

Thanks! I’ll give that a shot tomorrow.

---

<div class="post-metadata">

**Author:** ![bkwalker](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/b/c0e974/32.png) [@bkwalker](https://www.finalbuilder.com/forums/u/bkwalker)\
**Post date:** [November 24, 2020, 2:06pm UTC](https://www.finalbuilder.com/forums/t/agent-requirement-unable-to-compare-agent-property-provided-by-path-exists-property-collector-with-project-variable-1-9-2-464/6935/8 "2020-11-24T14:06:39Z")

</div>

confirmed, that’s the ticket. Didn’t expect the result of Path Exists plugin to be anything other than a boolean.
