Describe the problem
I am populating my database through an n8n workflow which is fetching data from an API. One of the fields of data is a “quantity” field and for some reason, this is set as a string from the API and to further complicate things it has mixed values such as “1x, 20x, several” as some of the values, but the vast majority are just numerical.
I need to use this field in a formula to make a calculation but obviously this cannot be done as a string. I thought maybe I could do this with a formula field with the formula regex_replace(field('quantity'), "[^0-9]", "")
which works great in getting the numerical value but the output of the field is still a string.
So my question is:
Is there a way to convert a field from string to numerical?