# Bug with sending data via form button from a lookup column

**URL:** <https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572>\
**Category:** Report a Bug\
**Created:** [February 13, 2020, 3:56pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572 "2020-02-13T15:56:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 13, 2020, 3:56pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/1 "2020-02-13T15:56:07Z")

</div>

My app’s URL: [borrowwamsipad.glideapp.io](http://borrowwamsipad.glideapp.io)

In a nutshell, I have a form button feeding a log. In that log I have a field called “Status” which is either “available or unavailable”. I also have an if/then called “Next Status” which gives the opposite status.

On a homescreen sheet, I have a lookup column that’s finding both the status and next status of an item. The homescreen displays the current status (Status) and has the form button that send the “next status” to the status column of the log (to complete the loop).

The glitch I’m experiencing is that even though I’m sending the “next status” value to the log, the current “status” value is the one recorded. The only thing I can think of is that it’s calculating the if/then in the log prior to the data actually being recorded which then would throw off all the conditions. Thoughts?

---

<div class="post-metadata">

**Author:** ![Tim\_Sullivan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tim_sullivan/32/3461_2.png) [@Tim\_Sullivan](https://community.glideapps.com/u/Tim_Sullivan)\
**Post date:** [February 13, 2020, 4:08pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/2 "2020-02-13T16:08:02Z")

</div>

Check your if statement - if you’re using a checkbox on your sheet that could be part of it. I had an issue where I was testing a checkbox to be true, and I didn’t need to. My mistake was this:

> =if (A1=“TRUE”,B3,B4)

It ALWAYS returned the value in B4 for me. After some checking, I found out i didn’t need the “TRUE” because it was a checkbox. If it’s checked, it’s TRUE, if not, it’s FALSE. All i needed was

> =if (A1,B3,B4)

This gave me the TRUE when the box was checked, returning the value in B3

Hope it helps.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 13, 2020, 4:28pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/3 "2020-02-13T16:28:33Z")

</div>

Thanks for the suggestion @Tim_Sullivan, but I’m not using spreadsheet formulas for the if/then…I’m using the if/then/else column in the Data Editor.

---

<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 13, 2020, 4:38pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/4 "2020-02-13T16:38:20Z")

</div>

Just going off of your order of precessing theory, what if you move the IF THEN column after the status column?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 13, 2020, 4:46pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/5 "2020-02-13T16:46:56Z")

</div>

In the iPad Status sheet? Just tried it…didn’t work.

 ![Screen Shot 2020-02-13 at 11.46.49 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/a/afb635e929e616468f671493f02966d68a7d1b13.png)

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 13, 2020, 5:18pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/6 "2020-02-13T17:18:52Z")

</div>

Related glitch. Instead of the if/then/else column in the ipad status sheet, I created an identical if/then/else in the log sheet. I then did a lookup of that value in the status sheet and attempted to pass THAT value via the form button to the log. Now, it the if/then/else in the log sheet correctly generates the opposite value that was passed to the log, but generates an _ **EMPTY** _ value within the status column. So weird.

---

<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 13, 2020, 7:04pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/7 "2020-02-13T19:04:40Z")

</div>

I studied your videos a few times and your logic seems sound. It reminded me of a similar post where somebody was having the same issue and got around it by displaying the value on the screen. You could put the NextStatus on the form and hide it with visibility as something to try. It sure seems like a bug to me.

> [@Could not send a "Lookup" column by Form and workaround](https://community.glideapps.com/t/could-not-send-a-lookup-column-by-form-and-workaround/4000):
>
> Hey guys, I encountered this problem in Form, which is I couldn’t send a data column to the spreadsheet (it made an empty cell) if the column is created by “Lookup” of a relation. Then I found it works correctly if I use the column as a component. As a workaround, because I did not make it appear, I made a template of \<!--ID--\> where ID is the column I wanted to send to the spreadsheet. Then I used the template as a component of the form. Finally, boom!! I am posting this because I thought…

Here’s a snippet of a private conversation I had with Mark a couple weeks ago. I couldn’t duplicate the issue myself, but when I tried it, it was a very simple test, so maybe something else was a factor in it not working.

> [@On another topic](https://community.glideapps.com/t/4032/6):
>
> I’m not sure. The way I understood it is that he is viewing a detail page in his app from a sheet that has a lookup column. He has a form button and he wants to use the Column Values (including the Lookup column) to pass along with the form submission to the form response sheet. Apparently it’s not passing that lookup value along. As a workaround, I’m guessing he created a template column from the lookup column and is displaying it with comment html tags in a rich text component to get it to pass through to the sheet. The comment tags probably prevent it from showing on the screen. That’s my interpretation anyway. In my staging app, I created a lookup column and I’m passing it through as a Column Value. It seems to work for me.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 13, 2020, 7:09pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/8 "2020-02-13T19:09:43Z")

</div>

That seems to be the same issue for sure. I even tried doing something similar where I had created a template column that was fed from the lookup column but that didn’t work either. I didn’t use the \<!–ID-\> syntax though. Is that a thing?

---

<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 13, 2020, 7:12pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/9 "2020-02-13T19:12:34Z")

</div>

I’m not sure what the intend was with the ID tag. Maybe to display inside a rich text component with the html tag hiding the value from view. Try adding a basic text component to the form that displays the NextStatus.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 13, 2020, 7:16pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/10 "2020-02-13T19:16:52Z")

</div>

I did that…same issue. The weird thing is that the NextStatus value is correct after the data refreshes…but on form submission, it generates either a blank value or the incorrect value.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [February 13, 2020, 8:18pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/11 "2020-02-13T20:18:33Z")

</div>

This seems to be a bug. I’ll take a look at it. Would you mind sharing your app, please, with the bug intact?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 13, 2020, 8:49pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/12 "2020-02-13T20:49:35Z")

</div>

Yes sir. The bug is still in tact . App is [borrowWAMSipad.glideapp.io](http://borrowWAMSipad.glideapp.io)

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [February 13, 2020, 9:47pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/13 "2020-02-13T21:47:51Z")

</div>

I can confirm that there’s something fishy going on. We’ll fix it. Thank you so much for reporting!

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 13, 2020, 9:52pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/14 "2020-02-13T21:52:42Z")

</div>

Whew! I thought I was doing something wrong. Thanks for looking into it!

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [February 14, 2020, 7:46pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/15 "2020-02-14T19:46:13Z")

</div>

This should be fixed now. Would you mind trying again, please?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 14, 2020, 7:58pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/16 "2020-02-14T19:58:19Z")

</div>

Just tested. The form button seems to send the data correctly! Now the issue is that my app needs to be refreshed in order for the changes to be displayed. I created a video that I’ll post as a followup once it uploads to YT.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 14, 2020, 8:12pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/17 "2020-02-14T20:12:32Z")

</div>



---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 14, 2020, 8:21pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/18 "2020-02-14T20:21:11Z")

</div>

Been testing it out more…it works, just REALLY laggy (minutes…not seconds). Wonder if it’s just my sheet.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [February 14, 2020, 8:25pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/19 "2020-02-14T20:25:32Z")

</div>

No, this should be instant - the spreadsheet isn’t even involved. I’ll take a look at it. Thanks for bearing with us!

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 14, 2020, 8:28pm UTC](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572/20 "2020-02-14T20:28:54Z")

</div>

No problem at all. Love the responsiveness and innovativeness of you and your team!

[Next page](https://community.glideapps.com/t/bug-with-sending-data-via-form-button-from-a-lookup-column/4572.md?page=2)
