Skip to main content

I am writing into a package runtime variable from input-box in a View. I want to wrap the contents of the variable with single quotes. Tried below YAML, but the single quotes disappear after I save and reopen.

 

id: input-box-e779d853-ce7f-46ed-b5f5-ddc3d277d9d0

type: input-box

settings:

 placeholderText: ${ABCD}

 name: ABCD

 type: string

 onChange:

  update:

   variables:

    - name: ABCD

    - name: 'package_ABCD'

 infoText:

  title: Mandatory field

  content: Please enter X to create XXXXXXXX with xxxxx xxxxx.

 

The YAML syntax trims the first and last single quotes in a string.
Could you please try adding extra single quotes or surrounding single quotes by double quote as shown below?

‘DON’’T’ => DON’T
“‘STRING’” => ‘STRING’
The YAML syntax trims the first and last single quotes in a string.
Could you please try adding extra single quotes or surrounding single quotes by double quote as shown below?

‘DON’’T’ => DON’T
“‘STRING’” => ‘STRING’

Thank you, Hajime for the answer, but extra single/double quotes are throwing "Value is not accepted." error.

 

Single quotes 

Double quotes


If you want to enclose the beginning and end of a string enclosed in single quotes, three single quotes are needed as the result of syntax.
Could you please try the following? ( Please note ‘’’ are all single quotes)

'''package_ABCD'''
If you want to enclose the beginning and end of a string enclosed in single quotes, three single quotes are needed as the result of syntax.
Could you please try the following? ( Please note ‘’’ are all single quotes)

'''package_ABCD'''

Same error.

 

Three single quotes


Could you please raise a support ticket with your full YAML code that can explain the difference of behavior with/without single quotes?
Could you please raise a support ticket with your full YAML code that can explain the difference of behavior with/without single quotes?

Thank you, Hajime, created the ticket 00250908.


Hi Harish,

I confirmed your ticket and interaction.

Your target string that you want to wrap it by single quote is the name of variables.

The single quote char is not allowed for the variable name.

But if you would like to give a string include single quote as a placeholder string in the input box text, giving single quote in the definition of package variable may help you.

Please see below my screenshot that the variable ${Text_Key} is replaced by 'single quote' as the placeholder of input box.

 

image.pngimage 


Hi Harish,

I confirmed your ticket and interaction.

Your target string that you want to wrap it by single quote is the name of variables.

The single quote char is not allowed for the variable name.

But if you would like to give a string include single quote as a placeholder string in the input box text, giving single quote in the definition of package variable may help you.

Please see below my screenshot that the variable ${Text_Key} is replaced by 'single quote' as the placeholder of input box.

 

image.pngimage 

Thank you, Hajime.

 

I am using the package runtime variable in KM filter. I enclosed the variable with single quotes in the filter and it worked.


Reply