Dollar sign + double curly braces inside string in google sheets (some kind of variable?)

679 Views Asked by At

I'm reviewing a google sheet that relates to an application I'm being asked to replicate, and there's something in one of the cells that I haven't encountered before and am not sure how to deal with it. It appears to me to be a variable of some sort (the syntax is similar, but not identical, to a handlebars expression), but I can't find where/how it's declared or where/how it's getting its value. Unfortunately, I have very little to present here code-wise, so I'm really just hoping someone has encountered this same thing and can shed a little light on what it is (I've changed the literal text to just be nonsense, but the main thing I'm trying to figure out is how the "${{price}}" aspect of this works).

Example:

'${{price}} discount from blah blah blah. Legal jargon, blah blah blah.'

I also have template JS that is related to this (though I don't know exactly how), but I'll paste the only reference I'm able to find to this variable within the code:

if (getManufacturerPriceSavings() === 0) {
   string = string.replace('${{price}} discount.', '');
}

Again, apologies for the apparent lack of code to look at with this one, but hopefully this is familiar enough to someone that it won't matter.

1

There are 1 best solutions below

3
tenbonks On

Im still a newbie to this, and I hope I havent misunderstood the question, but {{price}} looks to be a template variable, used in a templating language. The price value may be kept in a database out of the code, so that may be why you can't find it.