[BUG] error when doing multiselect which is dv.dependant
bug
**Context**
Hi, I am currently using a toolkit named "VVunderlore toolkit" on mobile which have Dataview, Templater, and Modalform integrate. I am not a regular developper or programmer and I am simply trying to modify the tool to better suit my taste. Hence, I was trying to make a new form, but I keep encountering the same problem.
I have a field that I name "MaxLevelSpell", which type is a number. And I have second field named "Kn_Spell", which type is a `multiselect`. "Kn_Spell" use a dataview query for it's option, that take inside a folder which path is ("Compendium/Spells").
**The bug**
The dataview query inside of the "Kn_Spell" field is as follow :
```
form.MaxLevelSpells ? dv.pages('"Compendium/Spells"').filter(p => p.file.frontmatter.level <= form.MaxLevelSpells).map(n => n.file.name).sort() : []
```
As you can see, the query ask for the value from the field above, which is a number, to filter the files inside of the folder based on the frontmatter key "level" inside of them.
The problem is : when typing a number in the "MaxLevelSpells" field, nothing shows up on the "Kn_Spell" field.
**Retry**
I have tried to test out why it was not working, and so I created a secondary form, in which I had 3 field :
-"Level"

-"Spell"

Which dataview query is this :
```
form.Level ? dv.array(dv.pages('"Compendium/Spells"').filter(p => p.level <= form.Level).map(t => t.file.name).sort()) : [ ]
```
-"Same but dataview"

Which basicaly got the same dataview query.
**Result of testing**
I have discovered that for reason I do not know, when trying to integrate a `form` result in a `multiselect` daraview query, the form result isn't returned correctly, while on the other hand, with the exact same query, it work perfectly fine in a `dataview` field.
**Conclusion**
I would henceforth ask if it is possible to explain to me why is it that it doesn't work in a `multiselect` field when the same exact line of code work on a `dataview` field.
Again, I am sorry of this issues isn't really in proper form, and my question may seems a bit stupid, but I am only doing this out of a hobby and barely even touch programming. So I woukd be delight to have answer on my problem, thank you very much.
6 条评论