# Strange Issue in If else if component

**URL:** <https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017>\
**Category:** Ask for Help\
**Created:** [February 21, 2024, 12:40pm UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017 "2024-02-21T12:40:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [February 21, 2024, 12:40pm UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/1 "2024-02-21T12:40:49Z")

</div>

Hi Guys,

I have a long table which has almost 40 columns.

I have an if else if block which is calculating values for me based on some condition.

It takes value from another if else if and displays value accordingly

Attaching screen recording of the database

As you can see individual if else if column has value. Now when I created if else if column with name “ifElseIfValue” which is combination of other if else if columns output. Only first row is giving the value. the rest of the columns are not computing and giving values. Is there any restriction on number of if else if we can use??

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [February 21, 2024, 12:50pm UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/2 "2024-02-21T12:50:33Z")

</div>

I tried to add If Else IF value inside another if Else if.  
Is this not allowed?

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 21, 2024, 12:54pm UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/3 "2024-02-21T12:54:23Z")

</div>

It would be helpful to see where the values are coming from. Your IF column is pulling values from other IF columns. How do those other IF columns work. Trace backwards until you see where the chain fails. If the value in those other IF columns are empty, then the result is also going to be empty on the final IF column.

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [February 21, 2024, 12:58pm UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/4 "2024-02-21T12:58:42Z")

</div>

Hi Jeff,

I traced it.

I am getting all values of if Else If.

when I am passing these values through another if Else If

I am only getting the first row values. The rest are coming blank in output

Attaching screenshot of the second if else if

 ![Screenshot 2024-02-21 at 6.30.55 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/8/b861246caf6f17f14d5c8cf0a6db65fab67405f4.jpeg)  
these have conditions marked in red

This below screenshot shows the values for first if else if condition in circled red

 ![Screenshot 2024-02-21 at 6.31.50 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/0/70fd3682dc51adc6c066d522d8d8d925175d9a4a.png)

Am I doing something wrong?

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 21, 2024, 1:08pm UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/5 "2024-02-21T13:08:19Z")

</div>

Looks to me that only the first row has values in those other IF columns. What are you expecting the final IF column to show in rows 2 through 6 if those other IF columns are empty?

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [February 21, 2024, 1:11pm UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/6 "2024-02-21T13:11:07Z")

</div>

No the final if else if has to show the values of other if else if based on condition .

Like in Screenshot shown above.

When the Total States is Leads ----\> it should show value of inboundidelse which its showing

When the Total states is Lost ----\> it should show value of lostifelse which is actually 10 as per my screenshot

When the Total states is Finalisation ----\> it should show value of finalisationifelse which is actually 1 as per my screenshot  
but in Final if else if its not showing anything

Likewise for other states too.

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 21, 2024, 1:13pm UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/7 "2024-02-21T13:13:35Z")

</div>

‘Lost’ is only true on row 6. Lostifelse is empty on row 6. Row 6 doesn’t care what’s in row 1. It cares what’s in row 6 and in row 6 Lostifelse is empty.

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [February 21, 2024, 1:16pm UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/8 "2024-02-21T13:16:00Z")

</div>

Now I understand what you mean,

how would I have to make it work?

What would be the best practice for me to solve this issue? **I would not be able to move it another table as all my other values are fetched from this particular table itself.**

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [February 21, 2024, 1:23pm UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/9 "2024-02-21T13:23:11Z")

</div>

is it possible for me to pull all the values of if else if to all rows available?

I guess then it will solve the problem right ?

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 21, 2024, 1:26pm UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/10 "2024-02-21T13:26:13Z")

</div>

> [@Dilip\_Adiga](#):
>
> how would I have to make it work?

That’s why I asked for more details about how the other IF columns work. I don’t know why they only return values in only the first row. That’s all in how you have it set up, but you have shown how those other IF columns are set up.

> [@Dilip\_Adiga](#):
>
> is it possible for me to pull all the values of if else if to all rows available?

Yes. You can use a Single Value column to retrieve a value from the first row and populate it on all rows.

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [February 21, 2024, 1:31pm UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/11 "2024-02-21T13:31:45Z")

</div>

Let me show you one if else if

Here there are single value taken from other table and displayed for each of condition.

The if else if column shows value based on the particular condition.

It is this showing value only in the first row.

 ![Screenshot 2024-02-21 at 6.58.58 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/9/2943e7ef4c11d3e42441bb80e281ee2a586852e7.jpeg)

> [@Jeff\_Hager](#):
>
> Yes. You can use a Single Value column to retrieve a value from the first row and populate it on all rows.

So I create another single value column to retrieve the output of all if else separately for it to populate in all rows?

is that ok to do?

**Or do you have any other suggestion ?**

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 21, 2024, 1:37pm UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/12 "2024-02-21T13:37:51Z")

</div>

> [@Dilip\_Adiga](#):
>
> The if else if column shows value based on the particular condition.

Keep working backwards. What’s the value of ‘Time Frame’ in each row? I suspect that Time Frame is only filled in the first row. Maybe that’s the column that needs to be repeated with a Single Value column.

> [@Dilip\_Adiga](#):
>
> So I create another single value column to retrieve the output of all if else separately for it to populate in all rows?
> 
> is that ok to do?

There is nothing particularly wrong with it. You have single value columns all over the place already. What’s another one…

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [February 21, 2024, 1:40pm UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/13 "2024-02-21T13:40:23Z")

</div>

I can do a single value for each of those results I get for if else.

That gives me my result.

Thank you Jeff,

Just wasn’t sure wether it was the right approach.

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 21, 2024, 3:00pm UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/14 "2024-02-21T15:00:10Z")

</div>

There’s no right or wrong way to do it as long as it works, But 1 single value column to repeat the time frame is more efficient than 6 single value columns to repeat each of the IF columns.

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [February 21, 2024, 3:13pm UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/15 "2024-02-21T15:13:25Z")

</div>

Hi Jeff,

“  
But 1 single value column to repeat the time frame” how do you do this ?

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 21, 2024, 5:07pm UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/16 "2024-02-21T17:07:30Z")

</div>

You have a Time Frame column, right? And I assume it’s only filled in the first row, correct?

I’m talking about the column that I highlighted in this screenshot.

 ![Screenshot_20240221-110232](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/4/44df50e3d7a8722da9bfaee62376938832b4646c.png)

Create a Single Value column that duplicates that same Time Frame across all rows exactly how you created any other Single Value column. Then change all of your IF columns to check the new Single Value Time Frame instead of the existing Time Frame column that’s only being filled in the first row. It’s one additional Single Value column instead of creating six single value columns to duplicate each individual IF column result.

Nothing special about it. Just doing exactly what you are already doing, but with less columns.

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [February 22, 2024, 3:34am UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/17 "2024-02-22T03:34:41Z")

</div>

Hi Jeff,

Please correct me if I am wrong. I was under the impression that Single value columns will write a single value to a cell.

Could you please tell me how do I get multiple values from multiple columns to write one below the other in different rows into same single value column?

Thank you for replying.

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 22, 2024, 4:28am UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/18 "2024-02-22T04:28:49Z")

</div>

I never said anything about using a Single Value column to write multiple different values into the same column, or multiple values from multiple columns for that matter. A Single Value column is typically used to repeat the same value in all rows.

> [@Jeff\_Hager](#):
>
> Create a Single Value column that duplicates that **same** Time Frame across all rows

If you already have it working, then don’t worry about it. Just go with what you already have. I was just offering a suggestion to make it a bit more efficient. I’m not sure how else to clarify it or explain it any better.

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [February 22, 2024, 4:45am UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/19 "2024-02-22T04:45:24Z")

</div>

Hi Jeff,

I think I figured out what you are saying. I also figured out the issue.

Thank you.

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [February 29, 2024, 4:46am UTC](https://community.glideapps.com/t/strange-issue-in-if-else-if-component/71017/20 "2024-02-29T04:46:01Z")

</div>

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