# Using form Variables in Custom Spreadsheet Formulas?

**URL:** <https://community.glideapps.com/t/using-form-variables-in-custom-spreadsheet-formulas/71128>\
**Category:** Ask for Help\
**Created:** [February 25, 2024, 9:42am UTC](https://community.glideapps.com/t/using-form-variables-in-custom-spreadsheet-formulas/71128 "2024-02-25T09:42:16Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 25, 2024, 10:29am UTC](https://community.glideapps.com/t/using-form-variables-in-custom-spreadsheet-formulas/71128/4 "2024-02-25T10:29:15Z")

</div>

> [@Rcart](#):
>
> However, I encountered a small issue where the application creates two rows in my spreadsheet when I submit the form. Do you have any suggestions on how to ensure it only creates one row?

That’s because you have an onSubmit action that Adds a Row.  
So when your form is submitted, a row is added. And then your onSubmit action adds a second row.  
You need to get rid of that onSubmit action.

I’d also encourage you to have a closer look at what @ThinhDinh said earlier…

> [@ThinhDinh](#):
>
> That sounds like a use case for a combination of relation & lookup.
> 
> In your destination table, create a relation linking the client code with the right column in the Client table. Don’t click the “match multiple” box.

The above is a much better approach than messing around with GSheet formulas. As a general rule, you don’t need any GSheet formulas when working with Glide (except in very rare cases). The Glide Data Editor has all the capability that you’re ever likely to need, and your App will perform much better if you avoid GSheet formulas.

> [@litter\_in\_bin\_sign Trash your Excel Formulas](https://community.glideapps.com/t/trash-your-excel-formulas/55788):
>
> wave Hey Gliders! By request, I created a video that explains how to replace 14 commonly used Google Sheet/Excel Formulas using Glide computed columns and other native Glide functionality. Formulas are timestamped in the description. For good measure, I also threw in how to use the Excel Formula plugin column upside_down_facepopcorn Enjoy! [[Glide: Replace 14 Excel Formulas with Glide Computed Columns] ](https://www.youtube.com/watch?v=YITKadLUKNE)

---

_[View the full topic](https://community.glideapps.com/t/using-form-variables-in-custom-spreadsheet-formulas/71128)._
