RoamJS / smartblocks

MIT License
23 stars 7 forks source link

Feature Request: RANDOMFROMQUERY #113

Closed brandon-toner closed 9 months ago

brandon-toner commented 9 months ago

Idea: Like RANDOMBLOCKMENTION, but for a more specific query.

Why I want this:

I'm also interested if you know of another way to accomplish the same result.

Thanks!

dvargas92495 commented 9 months ago

With Query Builder extension, you could define a query and specify random settings.

The <%QUERYBUILDER%> command then returns whatever is configured, but I sense once you have it set up on Query Builder itself, it will be sufficient.

brandon-toner commented 9 months ago

Great — I'll check that out!

brandon-toner commented 9 months ago

OK I figured out the query logic... could I use the Smartblock command to trigger the random output on this query and place the block reference when the command was triggered?

Desired workflow:

2024-01-20-0017 11_Screenshot

dvargas92495 commented 9 months ago

yea, if you give this query builder instance an alias on the top right (e.g. Pharmacies), then you should be able to do:

<%QUERYBUILDER:Pharmacies%>

brandon-toner commented 9 months ago

Wowwwww. Ok awesome! This is great.