# Use "%sc" as a condition when using set-map

**URL:** <https://discourse.haproxy.org/t/use-sc-as-a-condition-when-using-set-map/9380>\
**Category:** Help!\
**Created:** [January 6, 2024, 7:22pm UTC](https://discourse.haproxy.org/t/use-sc-as-a-condition-when-using-set-map/9380 "2024-01-06T19:22:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![newtohaproxy](https://avatars.discourse-cdn.com/v4/letter/n/7ab992/32.png) [@newtohaproxy](https://discourse.haproxy.org/u/newtohaproxy)\
**Post date:** [January 6, 2024, 7:22pm UTC](https://discourse.haproxy.org/t/use-sc-as-a-condition-when-using-set-map/9380/1 "2024-01-06T19:22:44Z")

</div>

Hello. I noticed that when I use “%sc” as a value to write to a map file, this is possible. However, if I try to use it as a condition, it does not seem to work. As an example, this is what I mean:

```auto
http-after-response set-map(/path/to/m.map) %[srv_name] "%sc" if { status 503 }

```

The above works correctly. It writes “%sc” (number of server connections) to the map.

However, if I try to do something like below:

```auto
http-after-response set-map(/path/to/m.map) %[srv_name] %[be_name] if { "%sc" 0 }

```

Then I get an error: `condition : missing fetch method in ACL expression '%sc'`.

How can I use this or create an acl to be able to use it in the manner I mentioned above? Thank you.
