# Ho to check empty variable in questions.yml?

**URL:** <https://forums.suse.com/t/ho-to-check-empty-variable-in-questions-yml/39662>\
**Category:** SUSE Rancher Prime\
**Created:** [December 14, 2022, 10:29am UTC](https://forums.suse.com/t/ho-to-check-empty-variable-in-questions-yml/39662 "2022-12-14T10:29:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ioclaudio](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/ioclaudio/32/8828_2.png) [@ioclaudio](https://forums.suse.com/u/ioclaudio)\
**Post date:** [December 14, 2022, 10:29am UTC](https://forums.suse.com/t/ho-to-check-empty-variable-in-questions-yml/39662/1 "2022-12-14T10:29:24Z")

</div>

Hi,  
I’m creating an app on Rancher 2.6.9 (using the file questions.yml) and I’d like to show these two variables:

- wordpress.persistence.size
- wordpress.persistence.storageClass

only when the variable:

- wordpress.persistence.existingClaim

is empty (unselected).  
Is it posbbile?  
Which is the right syntax?  
I’ve tried:

```auto
 show_if: "wordpress.persistence.existingClaim=''"
 show_if: "! wordpress.persistence.existingClaim"
 show_if: wordpress.persistence.existingClaim=""

```

but doesn’t work.

Thank you very much

```auto
- variable: wordpress.persistence.enabled
  default: false
  label: WordPress Persistent Volume Enabled
  description: "Enable persistent volume for WordPress"
  type: boolean
  required: true
  show_subquestion_if: true
  group: "WordPress Settings"
  subquestions:
  - variable: wordpress.persistence.existingClaim
    default: ""
    description: "Leave empty to create a new PVC and not to use an existing one"
    type: pvc
    label: Existing Persistent Volume Claim for Wordpress
  - variable: wordpress.persistence.size
    default: "10Gi"
    description: "WordPress Persistent Volume Size"
    type: string
    label: WordPress Volume Size
    show_if: "wordpress.persistence.existingClaim=''"
  - variable: wordpress.persistence.storageClass
    default: "wp-sns-storage"
    label: Default StorageClass for WordPress
    description: "If undefined or null, uses the default StorageClass. Default to null"
    type: storageclass
    group: "WordPress Settings"
    show_if: "wordpress.persistence.existingClaim=''"

```

Claudio

---

<div class="post-metadata">

**Author:** ![ioclaudio](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/ioclaudio/32/8828_2.png) [@ioclaudio](https://forums.suse.com/u/ioclaudio)\
**Post date:** [December 14, 2022, 10:41am UTC](https://forums.suse.com/t/ho-to-check-empty-variable-in-questions-yml/39662/2 "2022-12-14T10:41:35Z")

</div>

Sorry,  
actually I’ve tried again and this seems to work:

```auto
 show_if: "! wordpress.persistence.existingClaim"

```

cld
