Ho to check empty variable in questions.yml?

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:

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

but doesn’t work.

Thank you very much

- 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

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

 show_if: "! wordpress.persistence.existingClaim"

cld