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

API code not triggering Sheet automations

I'm using Warhammer 4th Edition sheets. On there, there is a dropdown for "Race". When you select Race, it populates a bunch of skills in a Repeatable section elsewhere on the sheet.

When I set Race via the API code command "setWithWorker", this does not trigger the skills to appear in the Repeatable section.

Am I going about this wrong, is there another trick to cause sheet-level logic to trigger?

March 16 (2 weeks ago)

Edited March 16 (2 weeks ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator

This appears to be a limitation of the API server. The warhammer sheet checks the compendium for what information to add to the sheet, however the API server does not have access to the compendium, and so this functionality fails. If you check your API console, you should see the following error message:

"ERROR: Don't know how to handle sheetWorker message: getcompendiumpage"

Edit: the error was because of how I had my script setup, but for normal scripts, the getCompendiumPage sheetworker just fails silently.

March 16 (2 weeks ago)

Edited March 16 (2 weeks ago)
The Aaron
Roll20 Production Team
API Scripter

I've created a Bug for this.  On the API server side, the best I could do is prevent it from crashing (by creating a no-op version of getCompendiumPage()), the real fix is exposing the compendium to the API.

Thanks. Is there a way for me to "subscribe" to the bug or in some sort of way know when it will be fixed? Like, are we talking weeks, months, years for a bug to be resolved?

March 18 (2 weeks ago)
The Aaron
Roll20 Production Team
API Scripter

Bugs are internal, but I linked this thread as the source, so it should get a response when there's a resolution. I can't speak to timing at all. 

Thanks, appreciate it!