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

Queries, labels and values

Mine might sound odd as a question, but I am wondering if there's a way to let a Query print the selected Label instead of the selected Value in the chat box. For instance, if I had a Query like the following one. ?{Restriction|None,100|1/day,75|1/month,50} I would like it to print its Label (the text) rather than the Value (the number). Is any of this possible with a Free subscription?
1617624352
David M.
Pro
API Scripter
You can only reference the value that the query returns (whether text or numeric). So if you need both the value and the "label", I don't believe that is possible without either a second query (free, below) or api access (pro, using conditionals). ?{Restriction Label|None,None|1/day,1/day|1/month,1/month}
1617628986
The Aaron
Roll20 Production Team
API Scripter
If you're wanting to use the result both in text and in a query, the best you can do is provide a text label like you would in a dice roll along with the value: ?{Restriction|None,100 [None]|1/day,75 [1/day]|1/month,50 [1/month]} That will let you show it in text as "75 [1/day]" and still use it in math "[[ 1d6 * 75 [1/day] ]]".
1617630683
David M.
Pro
API Scripter
Ah, good idea!
The Aaron said: If you're wanting to use the result both in text and in a query, the best you can do is provide a text label like you would in a dice roll along with the value: ?{Restriction|None,100 [None]|1/day,75 [1/day]|1/month,50 [1/month]} That will let you show it in text as "75 [1/day]" and still use it in math "[[ 1d6 * 75 [1/day] ]]". Yes, that was my goal, being able to use the result either as text and as a roll result. Thanks, I will try.