# Incorrect logic for checking matches between two lists in App Inventor?

**URL:** <https://community.thunkable.com/t/incorrect-logic-for-checking-matches-between-two-lists-in-app-inventor/3423484>\
**Category:** Questions about Thunkable X\
**Created:** [December 18, 2024, 8:15pm UTC](https://community.thunkable.com/t/incorrect-logic-for-checking-matches-between-two-lists-in-app-inventor/3423484 "2024-12-18T20:15:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rolona](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/rolona/32/191037_2.png) [@rolona](https://community.thunkable.com/u/rolona)\
**Post date:** [December 18, 2024, 8:15pm UTC](https://community.thunkable.com/t/incorrect-logic-for-checking-matches-between-two-lists-in-app-inventor/3423484/1 "2024-12-18T20:15:34Z")

</div>

![Screenshot_1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/6/e6e8f3b7f05a1bee76371bc2c14de016762126d8.png)

Can someone help me figure out why this isn’t working? The app doesn’t seem to correctly compare the numbers in the two lists.

---

<div class="post-metadata">

**Author:** ![rolona](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/rolona/32/191037_2.png) [@rolona](https://community.thunkable.com/u/rolona)\
**Post date:** [December 18, 2024, 8:28pm UTC](https://community.thunkable.com/t/incorrect-logic-for-checking-matches-between-two-lists-in-app-inventor/3423484/2 "2024-12-18T20:28:14Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/f/6fd7474b3218a4768e905229df5c6f251724c558.png)

I’ve tried this one too

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [December 18, 2024, 10:37pm UTC](https://community.thunkable.com/t/incorrect-logic-for-checking-matches-between-two-lists-in-app-inventor/3423484/3 "2024-12-18T22:37:36Z")

</div>

When comparing two values using math symbols, both values must be numbers. Text input’s text is going to be a string so you need to convert those by adding 0 to each one.

You can see an example in the link posted here: [Feature Request - Convert Text to Number & Number to Text](https://community.thunkable.com/t/feature-request-convert-text-to-number-number-to-text/2877322)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [December 18, 2024, 11:49pm UTC](https://community.thunkable.com/t/incorrect-logic-for-checking-matches-between-two-lists-in-app-inventor/3423484/4 "2024-12-18T23:49:14Z")

</div>

Hello @rolona  
Tatiang is correct and also you will need to set the “rezult” variable to zero every time the button is clicked.  
Here is a correct example:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/f/7f937d8186ff552d5bcfdb9db0e77d9a55874298.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [March 18, 2025, 11:50pm UTC](https://community.thunkable.com/t/incorrect-logic-for-checking-matches-between-two-lists-in-app-inventor/3423484/5 "2025-03-18T23:50:03Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
