Automatic fill repeating fieldset in Character sheet?

1531312142
Hello, i'm into creating a custom character sheet but before i'm diving into the JS programming i just want to look into the API and check if my idea's are working: So, we played "Das Schwarze Auge" (yes, i know it exists a character sheet for that) and that have a TON (one player has 128 Talents, each Talent has 3D20 to roll against a specific value. Yeah... Nice, right?) of Talents and my plan is just to create a character sheet which will be filled from a JSON object into the character sheet but with that huge amounts of Talents it will be a pretty pain to Copy&Paste them so my thought was using the repeating fieldset with the Add and Modify functions. I mean that will be perfect, just hit the Add-Event and fill the data. Well, that's the plan in theory, but how it will look in practical? I dive into the API and it looks that is not possible to achieve that in particular. Does one of the code gurus have an answer or a solution?  I totally need feedback on this and i'm totally open for another way to implement the Characters!  P.S. Yes i used the search with terms like "trigger fieldset event", "trigger fieldset" and also using alot of Google but it just show's Wikipages or confusing othersites with JS snippets. So sorry if i miss some threads!
1531312739
Jakob
Pro
Sheet Author
API Scripter
I can think of a number of ways to do that (I have personally implemented 1. and 2.): Have some kind of <select> outside the repeating section containing all the talent names, plus a "button" (=checkbox) next to it which, when clicked, will add a new row to the repeating section with all the information about that particular talent. React to changing the name of a talent in the repeating section, and automatically fill in the rest of the section if someone enters the correct talent name. (Variation on 2) Have a <select> inside  the repeating section which fills the row with all the information once a talent is selected. There's no  sheet worker event which is triggered when you press the "add" or "modify" buttons, so you can't really work with those.
1531320603
Finderski
Pro
Sheet Author
Jakob, couldn't the API (not Sheet Workers) be used to "import" the JSON file? I thought there were some scripts that do imports from Herolab or something?
1531328297

Edited 1531328326
Scott C.
Pro
Sheet Author
API Scripter
Doesn't even have to be an API script. A sheetworker can take the JSON copied as text into a textarea, process it and create everything from that, this is how the herolab importer on the PF Community sheet works.
1531402370

Edited 1531402427
Loki
Pro
Sheet Author
Yes, the way Scott C. describes works. I also did it this way in the character sheet I've created. A textarea where the player can paste a character as a JSON object and a script that parses the object one element by one and copies the values into the given fields. Of course this includes the possibility to add elements to repeating rows. In my case I had to do some translations because the JSON object comes from an external character generator that uses his own wording and formatting. So this may be a ton of work to do, but it's the most convenient way for the user to import a character.
1531405414
Thank you for all that input! <3 I took my time and look at the sheet worker which i before never heard of and that is exacly what i need. Also i'm using the generated data from an external character generator, feed it in my custom converter and boom, fill it in the Character sheet in a import textarea.