You are getting the choices, but not using them anywhere in setting the answers.
For matrix, first get the choices. const choices = this.getChoices();
Then get the answers const answers = this.getAnswers();
Then set the answers with this.setChoiceValue(choicesc0],answerse0],true);
And so on.
That being said, I would strongly recommend you look at the support pages for pre-populating responses. That will be much easier and faster for you.
Thanks @ahmedA - so would it be like this?
const choices = this.getChoices();const answers = this.getAnswers();
if ("${e://Field/ESGFirm}".includes("Yes")) this.setChoiceValue(choices(0],answers,0],true);
if ("${e://Field/ESGFirm}".includes("No")) this.setChoiceValue(choicesl0],answers[1],true);
if ("${e://Field/ESGPortfolio}".includes("Yes")) this.setChoiceValue(choicese1],answersc0],true);
if ("${e://Field/ESGPortfolio}".includes("No")) this.setChoiceValue(choiceso1],answersh1],true);
Also, according to all reading I’ve done and convos with Qualtrics support themselves, they don’t offer this level of functionality? You can preset written answer options or a constant multiple choice/matrix selection, but if you want it to vary based on embedded data, my research and what I’ve been told is that I have to use JavaScript - if there is another option, would be great though!