It’s confusing as all the Youtube video I watched about this never used “contains.” They did it the way I was trying and it worked for them. Perhaps they were old video??
I have changed the code to use the “contains” function as suggested below so I don’t have the code. I did try tab indent, 1 space, 2 spaces, etc. But nothing worked.
And now … the “contains” function that was working yesterday was not working this morning. !?!
For example, contains(key4, “four”) gives an error after the comma between “key4” and “four” where it didn’t yesterday.
I have made sure I’m using the latest version of Obsidian and Dataview.
If I edit the code using my iPad and keyboard case it inserts “ instead of ". It’s a subtle difference that I had not noticed until now. When I changed it it works.
Is it possible the “space bar” on the keyboard case is different as well?
When I get home I’ll try the other method again and see if that was the problem.
I don’t actively use yaml in obsidian except for single alias. My experience come from setting up linux docker yaml. The guide always say to use space bar spacing for indenting due to different code editor interpretation of tab indent.
Maybe I’ll try it out later as well in obsidian. Been thinking about setting up some structured metadata fields
After playing around on my iPad and iPhone I’m pretty sure it was the " and “ mixup. I guess my eyesight is getting worse with age, and I hadn’t expected my iPad keyboard case to be different from my Mac keyboard.
It’s working that way I originally tried it, and the way dugdun taught me. I actually like his method so I’m going to adopt that (thanks dugdun).