# Button action of form to check if field is unique

**URL:** https://community.glideapps.com/t/button-action-of-form-to-check-if-field-is-unique/35960
**Category:** Ask for Help
**Created:** [December 14, 2021, 9:25pm UTC](https://community.glideapps.com/t/button-action-of-form-to-check-if-field-is-unique/35960 "2021-12-14T21:25:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Trading\_5\_Talents](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/trading_5_talents/32/33858_2.png) [@Trading\_5\_Talents](https://community.glideapps.com/u/Trading_5_Talents)
#### Post date: [December 14, 2021, 9:25pm UTC](https://community.glideapps.com/t/button-action-of-form-to-check-if-field-is-unique/35960/1 "2021-12-14T21:25:30Z")

</div>

Hi! I have a custom form that writes to a temp table with user-specific columns, then sends the data to a specific table. I’d like to know if this is possible in Glide:

1. User enters stock trade info on form page
2. App checks to see if stock symbol is unique among all users
3. If yes, add trade info to Trade table and add a new row to another table with a specific value (incrementing numbers)
4. If not unique, just add info to Trade table

Thanks!

---

<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: [December 14, 2021, 10:05pm UTC](https://community.glideapps.com/t/button-action-of-form-to-check-if-field-is-unique/35960/2 "2021-12-14T22:05:22Z")

</div>

That sounds very similar to what I did in the post below, but instead of using a form to write a new record to the temp table and then transferring that info to another table, just use the temp table with user specific columns to accept the inputs, then let it check if there is a match through a single relation. If the relation is empty, then add a new row to the table. If the relation is not empty, then update the existing row through the relation.

> [@Why I can not see all the users](https://community.glideapps.com/t/why-i-can-not-see-all-the-users/35545/19):
>
> OK, I whipped this up quickly. Take a look and see if you have any issues or questions. I reverted the Amounts column back to a user specific column and re-enabled row owners, so any user data is protected except for what is added to the leaderboard table. There is use of Custom actions when viewing the activity details, and on the buttons to submit or cancel the point entry. Pay specific attention to how I set up those actions. Instead of using the native form, I’m using a custom form base…
