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 .
×
If you opened a D&D 2024 character on July 17 between 2:20 PM ET and 4:40 PM ET, and now see that your character data is missing/blank, please make a copy of your game and perform a rollback. Rollbacks have been enabled for all users during this period.
Create a free account

Button Roll Query not Working Inside Repeating Section

This button works fine outside a repeating section: <button type='roll' value='!wfrp @{intChar}@{intReck}@{intCons}@{observationExp}?{Fortune Dice|0}?{Challenge Dice|0}?{Misfortune Dice|0}-@{intFortune}@{intStress}' name='roll_advSkill'></button> Inside a repeating section, it fails silently. The culprit are the roll queries - if I remove them, it works. Why is this and can it be addressed? Note: The value calls an API that expects single-digit numbers pulled from various locations elsewhere on the sheet.
1748404459
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
There is no reason for roll queries to not work in a repeating section. I'd recommend removing the api command and seeing what you get if you send it straight to chat.
1748404647

Edited 1748411646
GiGs
Pro
Sheet Author
API Scripter
Just spitballing here. Does it work if you move the roll string outside of the repeating section. For instance, create this input  before  the repeating section: <input type="hidden" name="roll_string" value="!wfrp @{intChar}@{intReck}@{intCons}@{observationExp}?{Fortune Dice|0}?{Challenge Dice|0}?{Misfortune Dice|0}-@{intFortune}@{intStress}"> Then replace your button line with <button type='roll' value="@{roll_string}" name='roll_advSkill'></button>
1748410788
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Another thing to look at is, are those versions of those attributes in the repeating section with the same attribute name? That can cause issues with having the attribute call resolve correctly.
I now notice that roll queries aren't working anywhere in the sheet. For example, this works: <button type='roll' class='' value='/roll [[1d6]]' name='roll_observation'></button> This fails silently: <button type='roll' class='' value='/roll [[?{value|1}d6]]' name='roll_observation'></button> I've reloaded the browser (Edge), turned off AdGuard, and restarted the API sandbox multiple times. I can't get roll queries to work at all. Yesterday, as I opened the sandbox, I was prompted to upgrade my test instance to Jump Gate, which I did . Could this be the source of the problem? I notice a lot of "Refused to load the script" and "Refused to execute inline script" error messages in Edge DevTools that weren't there prior to the Jump Gate upgrade...
1748441833

Edited 1748441869
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Then there is something going wrong in your sandbox. Things to check: Do these work if you just send them in chat without sending them from a button? Is the query prompt behind the character sheet window? This was a bug in jump gate, but it was supposed to have been fixed in the last week or two If you make a new sandbox and upload your sheet code there, does it work?
OMG, the roll query popup is, indeed, appearing the character sheet. So, query strings are working but Jump Gate bug not apparently deployed. Let me go back and re-examine my OP issue. Thanks! Scott C. said: Then there is something going wrong in your sandbox. Things to check: Do these work if you just send them in chat without sending them from a button? Is the query prompt behind the character sheet window? This was a bug in jump gate, but it was supposed to have been fixed in the last week or two If you make a new sandbox and upload your sheet code there, does it work?
1748467374
GiGs
Pro
Sheet Author
API Scripter
Scott C. said: Is the query prompt behind the character sheet window? This was a bug in jump gate, but it was supposed to have been fixed in the last week or two That's interesting. I missed any notice of that being fixed, and it's the main thing that has kept me off Jumpgate.
I can understand why. I'm going to spin up a new, non-jump gate sandbox until it's matured a bit more.
1748485323

Edited 1748486052
vÍnce
Pro
Sheet Author
JG's "peek-a-boo-query" bug seems to come and go with JG updates IME...  The query window is currently working as expected for me in the latest versions of windows FF & Chrome however. (yay!) 
Update: Roll queries are working as expected in jump gate on prod, but not in SB.
1748639879
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
in what way aren't they working (I'm assuming SB is the sandbox)
1748641730

Edited 1748641759
vÍnce
Pro
Sheet Author
Scott C. said: in what way aren't they working (I'm assuming SB is the sandbox) Query windows are behind sheets and handouts in JG Sandbox games. You literally need close/move in order to get to the query window.  IME, this has happened at various times in regular JG games over it's development as well.
1748642941
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, gotcha.