# Compare input with database value workflow

**URL:** <https://forum.bubble.io/t/compare-input-with-database-value-workflow/235964>\
**Category:** Database\
**Created:** [December 7, 2022, 1:47am UTC](https://forum.bubble.io/t/compare-input-with-database-value-workflow/235964 "2022-12-07T01:47:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefan.recouvreur](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/stefan.recouvreur/32/152981_2.png) [@stefan.recouvreur](https://forum.bubble.io/u/stefan.recouvreur)\
**Post date:** [December 7, 2022, 1:47am UTC](https://forum.bubble.io/t/compare-input-with-database-value-workflow/235964/1 "2022-12-07T01:47:05Z")

</div>

Howdy!

I am building a Duolingo clone, where a random question (taken from my database “Questions”) is displayed on screen, and the user needs to input an answer.

 ![Screenshot 2022-12-07 at 12.37.06 pm](https://us1.discourse-cdn.com/bubble/original/3X/6/0/60458c1749ac5d949df27188f9953a72ca5f9261.png)

In my database, there is a correct answer for each question (see below).

 ![Screenshot 2022-12-07 at 12.36.49 pm](https://us1.discourse-cdn.com/bubble/original/3X/a/d/adc0f5ec43767e1325f435341895dad26eac8111.png)

After a user submits their answer, I would like to evaluate whether the INPUT is equal to the ANSWER in the database.

However, I am unable to evaulate the input against the CURRENT question on screen (which is randomly selected on page load).  
 ![Screenshot 2022-12-07 at 12.41.08 pm](https://us1.discourse-cdn.com/bubble/original/3X/7/7/77332fe9eebdbee1b22dd796279b2db6b0b13961.png)

Any clue on how to best approach this?

Thanks for your help 😀

---

<div class="post-metadata">

**Author:** ![adamhholmes](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/adamhholmes/32/100510_2.png) [@adamhholmes](https://forum.bubble.io/u/adamhholmes)\
**Post date:** [December 7, 2022, 1:52am UTC](https://forum.bubble.io/t/compare-input-with-database-value-workflow/235964/2 "2022-12-07T01:52:36Z")

</div>

You just need to reference the Question…

So wherever the question is loaded (presumably in a Group somewhere), just refer to that in your workflow…

i.e. when Input’s value is Group’s Question’s Answer…

---

<div class="post-metadata">

**Author:** ![stefan.recouvreur](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/stefan.recouvreur/32/152981_2.png) [@stefan.recouvreur](https://forum.bubble.io/u/stefan.recouvreur)\
**Post date:** [December 7, 2022, 2:03am UTC](https://forum.bubble.io/t/compare-input-with-database-value-workflow/235964/3 "2022-12-07T02:03:02Z")

</div>

Thanks for your quick reply @adamhholmes

So yes, my question is indeed inside a group named “Question group”.

 ![Screenshot 2022-12-07 at 1.01.19 pm](https://us1.discourse-cdn.com/bubble/original/3X/f/7/f7eb7befa56f09c7844cf5bd5c8e5a2ebad4503e.png)

However, when trying to reference it, all I see are irrelevant variables… What am I missing?  
 ![Screenshot 2022-12-07 at 1.01.35 pm](https://us1.discourse-cdn.com/bubble/original/3X/2/f/2f40f42f30071e7dae4984908bae9c1c0d75fd93.png)

---

<div class="post-metadata">

**Author:** ![adamhholmes](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/adamhholmes/32/100510_2.png) [@adamhholmes](https://forum.bubble.io/u/adamhholmes)\
**Post date:** [December 7, 2022, 2:18am UTC](https://forum.bubble.io/t/compare-input-with-database-value-workflow/235964/4 "2022-12-07T02:18:18Z")

</div>

What Content-Type does the Group have?

also, your two screenshots don’t match up… one show ‘Question group’ the other is ‘Question Group Content’… those are two different elements… so I’m not sure which one is the Group that holds the question?..

In fact, I can’t work out from the screenshot what kind of element ‘Question Group Content’ is at all (it doesn’t look like a group?)…

---

<div class="post-metadata">

**Author:** ![stefan.recouvreur](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/stefan.recouvreur/32/152981_2.png) [@stefan.recouvreur](https://forum.bubble.io/u/stefan.recouvreur)\
**Post date:** [December 7, 2022, 2:35am UTC](https://forum.bubble.io/t/compare-input-with-database-value-workflow/235964/5 "2022-12-07T02:35:44Z")

</div>

Aaaah I get it now. 😅

So the **Content-Type** was missing from my **Question Group Content**.

 ![Screenshot 2022-12-07 at 1.25.19 pm](https://us1.discourse-cdn.com/bubble/original/3X/8/8/88f8e32fac2c296f0d6b96d2b9a4bd5c131cd4f2.png)

I can now see the correct variable in the workflow.  
 ![Screenshot 2022-12-07 at 1.25.36 pm](https://us1.discourse-cdn.com/bubble/original/3X/4/a/4ab531721e3b575f37a48c7286076e72a3e22dc1.png)

I am unsure now as to why the page doesn’t refresh when the correct answer is added in the input field though. 🧐 But at least I am getting closer!

Thank you @adamhholmes !
