# Using Global get Ex on Noop call giving error when deploying app

**URL:** <https://forum.algorand.co/t/using-global-get-ex-on-noop-call-giving-error-when-deploying-app/5314>\
**Category:** General\
**Created:** [December 5, 2021, 6:49am UTC](https://forum.algorand.co/t/using-global-get-ex-on-noop-call-giving-error-when-deploying-app/5314 "2021-12-05T06:49:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Ben](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.algorand.co/ben/32/1979_2.png) [@Ben](https://forum.algorand.co/u/Ben)\
**Post date:** [December 5, 2021, 4:22pm UTC](https://forum.algorand.co/t/using-global-get-ex-on-noop-call-giving-error-when-deploying-app/5314/2 "2021-12-05T16:22:37Z")

</div>

Hi jjEvans,

This trips up a lot of folks. It has to do with the AppGlobalGetEx returning a MaybeValue which needs to be included in a Seq (or some other expression) prior to calling `hasValue`

You may try something like

```auto
   myStatus = App.globalGetEx(0, Bytes("Count"))
   handle_noop = Seq(
    myStatus,
    Cond(
       [And(
            Global.group_size() == Int(1),
            Txn.application_args[0] == Bytes("Add"),
            myStatus.hasValue()
        ),add],
        [And(
            Global.group_size() == Int(1),
            Txn.application_args[0] == Bytes("Deduct"),
        ), deduct]
   )
)

```

This is a strange way to offer this functionality so I hope will be tweaked in upcoming versions of PyTEAL.

Ben

---

_[View the full topic](https://forum.algorand.co/t/using-global-get-ex-on-noop-call-giving-error-when-deploying-app/5314)._
