Help with set variable in tool

Steps taken so far

Score Comparison Logic for Quiz Webhook Data

We are receiving quiz response data via a webhook. Each response includes a set of answers provided by the user and the corresponding correct answers from the system.

We need to implement a logic that:

Compares each user’s answer with the correct answer.

Awards 1 point for each correct match.

Calculates the total score and percentage based on the number of questions.

The expected output should include:

Total score

Total number of questions

Percentage score

Optionally, a detailed breakdown of each question (user’s answer vs correct answer, and whether it was correct)

Screenshots: scenario setup, module configuration, errors

Hey there,

your formulas are all wrong. As a basic rule - if it turned black you deleted something you shouldn’t have. Meaning the contains() formula is not doing anything at the moment.

Also contains() is for arrays and it doesn’t look like you are checking arrays. Maybe you are looking for if() or switch() instead.

Welcome to the Make community!

It looks like you have tried to use JavaScript in there (based on the existence of the ternary conditional operator), which will not work as there is no such thing in Make.

In Make, for brackets, functions, and operators, you will have to select them individually from the Variables panel.

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

Getting Started

Help Centre Basics

Articles & Videos

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.