Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Nesting templates within Drop down queries

July 18 (6 years ago)

Edited July 18 (6 years ago)

So I have no doubt similar questions have been asked, and I know there's a google doc to help with nesting drop down queries, however I'm still stuck with one of my macros.

the simplified version of my macro goes like this:

/w "@{selected|character_name}" &{noerror} ?{What Info do you want?|
Movement Info , #Terrain |
Weapom Stats , ?{Weapon |
                H1: @{selected|msH1} , &{template:default} {{name= @{selected|msH1} %{@{selected|msH1}|Describe} }} |
                H2: @{selected|msH2} , #[INFO]Hand2
                 }
}

There's more options in the drop down lists, but I doubt they're necessary as the 2nd ones are all the same code.

The html replacement version to my understanding should be:

/w "@{selected|character_name}" &{noerror} ?{What Info do you want?|
Movement Info , #Terrain |
Weapom Stats , ?{Weapon |
                H1: @{selected|msH1} , &{template:default} {{name= @{selected|msH1} %{@{selected|msH1}|Describe} }} |
                H2: @{selected|msH2} , #[INFO]Hand2
                 }
}

However, this doesn't work for me, I can select any option from the 1st drop down list without issue, with exception of the one that causes the 2nd drop down list to appear. Instead it turns it into a query:

"H1: (variable) , &{template:default"

I used the google dropdown nester to try and solve the issue but ended up with the same problem, with the exception of there being no default value in the query.

I figured I'll post a topic to see if i'm missing anything as i honestly don't know what could be incorrect, I've double checked multiple times that the } at the end of default is a single } but its always the same result.

If you want to see the full code for the 2nd drop down (including the macro it calls #[INFO]Hand1,2,etc) here it is: https://prnt.sc/ogkohe

July 18 (6 years ago)

Edited July 18 (6 years ago)
GiGs
Pro
Sheet Author
API Scripter

I dont try to make nested queries work any more since discovering Chat Menus, but one thing I notice in yours, is this:

#Terrain

You'll need to expand that macro in the body of your macro. When roll20 runs your macro, it'll expand any macro calls within it, and treat it as one big macro. So, it's likely you'll need to replace one or more characters in there.

Also on your final example, screenshots of code are worse than useless. Its better to put on a pastebin or similar site where people can copy it and edit with it.