How do I use dollar sign ($) in an answer?
All versions, Answers, Customer Portal
Oracle Service Cloud
Dollar sign ($) can be used to insert custom Variables into an answer, as explained in Answer ID 415: Creating and using system and answer variables. Meanwhile, the dollar sign can also be displayed differently based on the characters immediately following it.
For single dollar sign:
1. If followed by a string starting with alphabetical characters, the dollar sign will be treated as custom variable prefix. If a matching custom variable exists, the variable content will be displayed. Otherwise, the string content will be displayed as-is.
2. If followed by a numeric character immediately, the text will not be treated as customer variable. So monetary units can be entered as normal.
For double dollar signs:
1. If used alone, only one $ sign will be displayed.
2. If followed by any string, either starting with alphabetical or numeric character, then the text will not be treated as customer variable and will be displayed as-is.
Content in Answer Source
Display on Customer Portal
|$variable||Hello!||Matching variable exists and variable content is displayed.|
|$randomtext||$randomtext||No matching variable, so text is displayed as-is.|
|$123||$123||Followed by numeric character immediately, not treated as variable.|
|$$||$||Double dollar sign used alone, only one $ sign is displayed.|
|$$variable||$variable||Double dollar sign followed by string, not treated as variable, displayed with only one $. Use three $$ in order to display two $.|