# New form defaults to the correct table, but doesn't

**URL:** <https://community.glideapps.com/t/new-form-defaults-to-the-correct-table-but-doesnt/46755>\
**Category:** Ask for Help\
**Created:** [August 15, 2022, 2:06am UTC](https://community.glideapps.com/t/new-form-defaults-to-the-correct-table-but-doesnt/46755 "2022-08-15T02:06:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [August 15, 2022, 2:06am UTC](https://community.glideapps.com/t/new-form-defaults-to-the-correct-table-but-doesnt/46755/1 "2022-08-15T02:06:47Z")

</div>

Hi there. So on a ‘show form’ screen, it gets the columns from the correct table (but I can’t define the table any longer when clicking the “add” button I’ve defined; Why?). But when I try to set the default value of a field, it wants to take it from the user table. Why? I’m thinking it’s related to the “work-around” I put in place to enable the ‘add’ button to be visible when no records existed for a user. So I set the detail form source to be the user table. But no matter what other table I set it to, then, it seems it is going to work correctly for the content of the screen, but it will try to set the “default” values from the detail screen’s default table (in this case user’s tab).

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/3/f327e2bac3b142cb432f62a2c7f40ba6570552f8.png)

---

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [August 15, 2022, 2:24am UTC](https://community.glideapps.com/t/new-form-defaults-to-the-correct-table-but-doesnt/46755/2 "2022-08-15T02:24:49Z")

</div>

Well, now something is certainly wrong; because I reversed my “work-around” and there are no visibility conditions on the add button, and there _are_ records in the table that is set as the default for the detail page. But there is no add record button visible.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/a/8a40765f248eb48928a8a793f55d912619f9917f.png)  
And because I knew you’d ask; there are no conditions at all on the show form button…  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/f/bfd0978e3dfd442f3b9bb68c91ff34088ba76e7d.png)

---

<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:** [August 15, 2022, 4:36am UTC](https://community.glideapps.com/t/new-form-defaults-to-the-correct-table-but-doesnt/46755/3 "2022-08-15T04:36:06Z")

</div>

> [@David\_Gabler](#):
>
> but I can’t define the table any longer when clicking the “add” button I’ve defined

Check if the table is defined on the action of your form button.

> [@David\_Gabler](#):
>
> But when I try to set the default value of a field, it wants to take it from the user table

This is expected behavior. The screen that contains your Add button is sourced from the user table. The form is then able to retrieve default values from that source table, or you can pass along values through the form using Value components. Your tab happens to be sourced from the user table, so what you are seeing is values from the user table. Whichever table contains the form button will be the table that provides values you can use. It gets more confusing because you are building your screens against the user table. That’s another reason I tend to just create separate single row tables for my tabs. It’s cleaner, easier to understand, and has some addition benefits down the road.

> [@David\_Gabler](#):
>
> because I reversed my “work-around”

So you are certain that the table that is the source of your mileage tab contains rows that are accessible to the user, and you don’t have any filters on the tab screen? Check the screen filters. Not the button visibility.

---

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [August 15, 2022, 7:43pm UTC](https://community.glideapps.com/t/new-form-defaults-to-the-correct-table-but-doesnt/46755/4 "2022-08-15T19:43:30Z")

</div>

> [@Jeff\_Hager](#):
>
> So you are certain that the table that is the source of your mileage tab contains rows that are accessible to the user, and you don’t have any filters on the tab screen? Check the screen filters. Not the button visibility.

Thank you for your detailed analysis. I am certain that there are rows available and I have no filters. I have not had a chance to look at it again today.
