Skip to content
Discussion options

You must be logged in to vote

Got this working based on @blacksmithgu's response to this thread in 2022. It turns out I had made a few errors:

  • dv.func does not need to be wrapped inside a {return} for this purpose
  • there is a separate call, dv.fileLink that checks for file names in metadata

With these changes, the following query returns 1:

$=dv.pages('#stuff').where(p => dv.func.contains(p.stored_in, dv.fileLink("box-1"))).length

And the final query:

$=dv.current().this_boxes_available - dv.pages('#stuff').where(p => dv.func.contains(p.stored_in, dv.fileLink("box-1"))).length

Correctly returns 3.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pubdigital
Comment options

Answer selected by flatlines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants