Dynamic Tables (CMS) combinds Choises of two or more radiobuttons

Question:
Dynamic Tables (CMS) combinds Choises of two or more radiobuttons

Product:
Wix Editor

What are you trying to achieve:
Hello folks. I would like to ensure that when two or more radio buttons are selected, a single CMS table is filled.

the first question. Is this even possible in wix?

So far I have only managed to transfer the selection from a radio button, see code from another page. If I could get this one, that would be the best.

For explanation you can see what the user can select in the appendix below. Currently selection in 2 radio buttons.
After selecting both and submit, the table should be filled correctly in the sense of an index, depending on the “hit”. For further explanation, the second picture. You can see how I set it up in the cms

What have you already tried:
i’ve tried many codes, but non of this worked

Code for one radiobutton:
import wixData from ‘wix-data’;

$w.onReady(function () {
$w(“#submitButton”).onClick(() => {
let selectedValue = $w(“#radioGroup1”).value;

    wixData.query("reviews")
        .find()
        .then((results) => {
            if (results.items.length > 0) {
                let item = results.items[0]; // Takes the first (and only) entry in the database

               //Update the corresponding rating based on the selection
                if (selectedValue === "perfect") {
                    item.perfect = (item.perfect || 0) + 1;
                } else if (selectedValue === "verygood") {
                    item.verygood= (item.verygood || 0) + 1;
                } else if (selectedValue === "okay") {
                    item.okay = (item.okay || 0) + 1;
                } 

              // Save the updated data to the database
                wixData.update("reviews", item)
                    .then(() => {
                        console.log("review succesfull");
                        $w("#text1").text = "Thanks for the review!";
                        $w("#text1").show();
                        $w("#Bewertungen").refresh();
                    })
                    .catch((err) => {
                        console.error("error while updating: ", err);
                    });
            } else {
                console.error("No Entries found");
            }
        })
        .catch((err) => {
            console.error("Issue: ", err);
        });
});

});

Hi, user3871 !!

Personally, I think it would be beneficial to reconsider how fields are defined in the collection. Creating a table-like structure in the collection may be suitable for human readability, but it can become a source of difficulty when writing code. In the system you’re trying to build, I believe there are at most 12 possible combinations, so defining field names like “perfect(1-2)” or “verygood(1-2)” might make update processing easier. Probably. Apologies if I’m mistaken. :thinking:

Hi one more time,
thanks for your input. That would be the simple solution and can be implemented with the existing system. I think that the user experience would not be so good because then for each value, for example “perfect”, there would be four different “times” to choose from and that for each value. To explain: “perfect 1-2”, “perfect 3-4”, perfect 5-6" and so on. There are currently 5 “results” and 4 “times” each.