# \[Solved\] Problem Block \< in if condition

**URL:** <https://community.thunkable.com/t/solved-problem-block-in-if-condition/320158>\
**Category:** Questions about Thunkable X\
**Tags:** solved\
**Created:** [November 14, 2019, 3:13pm UTC](https://community.thunkable.com/t/solved-problem-block-in-if-condition/320158 "2019-11-14T15:13:03Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![franckled](https://avatars.discourse-cdn.com/v4/letter/f/58956e/32.png) [@franckled](https://community.thunkable.com/u/franckled)\
**Post date:** [November 14, 2019, 3:13pm UTC](https://community.thunkable.com/t/solved-problem-block-in-if-condition/320158/1 "2019-11-14T15:13:03Z")

</div>

Hi all  
I spent many hours trying t

 ![57](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/7/2751ac539ed5792423d36d592a097b62019b22cf.png) o solve a problem.  
I want to find a minimum from 4 variables.  
Quit simple, it is impossible to selct the correct one… In my example, the code choose always the third one (number 11) instead of the second one (number 2).  
Arrgghh

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [November 14, 2019, 3:18pm UTC](https://community.thunkable.com/t/solved-problem-block-in-if-condition/320158/2 "2019-11-14T15:18:39Z")

</div>

Hi @franckled! 👋

Try replacing the continuous **`if`** blocks with **`else if`** statements (inside the **`do loopmin`** function) -  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/7/d7124473e4a436df879113911a1404b61a66b10f.png)

Thanks! 😊

---

<div class="post-metadata">

**Author:** ![franckled](https://avatars.discourse-cdn.com/v4/letter/f/58956e/32.png) [@franckled](https://community.thunkable.com/u/franckled)\
**Post date:** [November 14, 2019, 3:19pm UTC](https://community.thunkable.com/t/solved-problem-block-in-if-condition/320158/3 "2019-11-14T15:19:41Z")

</div>

Hello thanks…  
I also tried with this option…

☹

No result

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [November 14, 2019, 3:24pm UTC](https://community.thunkable.com/t/solved-problem-block-in-if-condition/320158/4 "2019-11-14T15:24:43Z")

</div>

Hi Franck! 👋

If you could provide me a detailed version of what you want to achieve, It’ll be easy for me to understand your problem 🙂

Also, can you please elaborate on why are you using a **`repeat`** block for finding minimum?

Thanks! 😊

---

<div class="post-metadata">

**Author:** ![franckled](https://avatars.discourse-cdn.com/v4/letter/f/58956e/32.png) [@franckled](https://community.thunkable.com/u/franckled)\
**Post date:** [November 14, 2019, 3:31pm UTC](https://community.thunkable.com/t/solved-problem-block-in-if-condition/320158/5 "2019-11-14T15:31:47Z")

</div>

I have to test four input texts to find the minimum.  
In my example, I directly put the figures in the text option of the block  
I repeat because as it doesn’t work I would want to know if the problem was the same after two or three tests.  
In fact, I just want to know when the user types numbers in the boxes which of the four input text is the minimum.  
Thanks +++++ :-d:sleepy:😭

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [November 14, 2019, 3:33pm UTC](https://community.thunkable.com/t/solved-problem-block-in-if-condition/320158/6 "2019-11-14T15:33:25Z")

</div>

Hi,

To find the minimum, add all the values to the list and use the ready-made block.

![%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/a/2a001de802b07279d49aeeeb0162e78a03610c75.png)

---

<div class="post-metadata">

**Author:** ![franckled](https://avatars.discourse-cdn.com/v4/letter/f/58956e/32.png) [@franckled](https://community.thunkable.com/u/franckled)\
**Post date:** [November 14, 2019, 3:34pm UTC](https://community.thunkable.com/t/solved-problem-block-in-if-condition/320158/7 "2019-11-14T15:34:46Z")

</div>

Oh yeah  
I like this solution !!!  
😀  
👌

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [November 14, 2019, 3:35pm UTC](https://community.thunkable.com/t/solved-problem-block-in-if-condition/320158/8 "2019-11-14T15:35:25Z")

</div>

![%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/9/7917b18d8a19373003adaa4cef108c07cd573347.png)

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [November 14, 2019, 5:09pm UTC](https://community.thunkable.com/t/solved-problem-block-in-if-condition/320158/9 "2019-11-14T17:09:16Z")

</div>

I was also giving this solution, but could not coz I was not online due to some problems 😄

Thanks! 😊  
**P.S.** So @franckled Is your problem solved? Should I mark this topic as Solved?

---

<div class="post-metadata">

**Author:** ![franckled](https://avatars.discourse-cdn.com/v4/letter/f/58956e/32.png) [@franckled](https://community.thunkable.com/u/franckled)\
**Post date:** [November 14, 2019, 7:35pm UTC](https://community.thunkable.com/t/solved-problem-block-in-if-condition/320158/10 "2019-11-14T19:35:46Z")

</div>

Yes  
It works fine  
THANKSSSSS !!

---

<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:** [November 8, 2024, 11:46am UTC](https://community.thunkable.com/t/solved-problem-block-in-if-condition/320158/11 "2024-11-08T11:46:41Z")

</div>


