Closed ccr112393 closed 1 year ago
Here's a quick screen recording showing what happens.
I'm having a very similar issue. DBFolder doesn't seem to recognize my .js
files. To sort of test this, I set my formula to ${JSON.stringify(db.js)}
and the value is {}
.
It started working for me. I can’t say for certain, but I think it was because I had an error in my code. But it would still happen even if I only had the example script in the folder. Not sure - but it has been working well for the last few days! Thank you dev for such an awesome plugin!
Having the same issue with this code:
/**
* Formula: ${db.js.punkte(row.hausaufgaben,row.gelernt)}
* @param {*} hausaufgaben [idk the type of booleans so this type is empty]
* @param {*} gelernt int
* @returns string representing the status of the goal
*/
function punkte(hausaufgaben, gelernt) {
var hausaufgaben_punkte = 0;
if (hausaufgaben) {
hausaufgaben_punkte = 3;
}
return gelernt / 10 + hausaufgaben_punkte;
}
module.exports = punkte;
It gives the following error (which seems to be an error of the error handling saying it couldnt run the formula):
@RafaelGB @ccr112393
Hi!
I am experiencing a similar issue to the one below. I've enabled Javascript and specified my scripts folder, but DB Folder doesn't seem to be able to see the files and when I enable Javascript at the database level it completely disappears.
I have a code in "/js/test.js"
I’m using the formula
${db.js.test()}
So my filename seems good, in setting, I activated the JS, and select the folder "js" What is the problem ?
Originally posted by @VociNur in https://github.com/RafaelGB/obsidian-db-folder/discussions/784