Things I have tried
Make Progress Bar from MetaData using Variables from same file.
I want to use Progress and Target and divide to get the value of progress.
I have tried this.Progress and dv.current().Progress but both didn’t work.
Progress get the correct number of objects and so does Target but Progress_Bar return NaN with empty progress bar.
What I’m trying to do
%%
Pillars:: [[Learning|Learning]]
Progress:: `$= dv.page("2022-07-14 - German").file.inlinks.where(p => {const mp = dv.page(p.path); return mp.tags?.contains("Objective") && mp.status === 'Completed'}).length`
Target:: `$= dv.page("2022-07-14 - German").file.inlinks.where(p => {const mp = dv.page(p.path); return mp.tags?.contains("Objective")}).length`
Progress_Bar:: `$= "<progress value='" + (this.Progress / this.Target) * 100 + "' max='100'></progress>" + " " + (dv.current().Progress / dv.current().Target) * 100 + "%"`
Objectives:: `$= const objectives = dv.page('2022-07-14 - German').file.inlinks.where(p => { const mp = dv.page(p.path); return mp.tags?.contains('Objective') && mp.status === 'In Progress'}); if (objectives.length > 0) { dv.header(4, objectives.length > 1 ? "Objectives" : "Objectives"); dv.list(objectives) }`