Database Folder Formulas

I am moving my database from to the db folder plugin I need to do some simple math formulas to add two column values together and then use the result in another column formula

I am using this in the column formula box for row.f
${(row.y) + (row.x)}
the values are 10 and 2
it does the addition correctly but it puts a string value into the metadata instead of an integer like this “12”
so when I use it in another formula ${(row.x) + (row.f)} it concatenates the string instead of performing the math function
so the result is another string “212”

I don’t know javascript but I want to learn it for this purpose I can’t find any tutorials or examples that make sense for db folder

Ok, I figured it out

${((row.pst * row.price).toFixed(2))}

I just asked to chatGPT!

Also, I needed to check inline field and persistent formula output

it was YAML that was adding the quotes

I had to remove the values from the frontmatter manually before it would place the results of the formula in the body of the note

and also, I had to refresh dbfolder for it to recalculate and show the correct answer


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.