# Query rows via API

**URL:** https://community.glideapps.com/t/query-rows-via-api/75092
**Category:** Ask for Help
**Tags:** api
**Created:** [July 22, 2024, 10:56pm UTC](https://community.glideapps.com/t/query-rows-via-api/75092 "2024-07-22T22:56:50Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [July 24, 2024, 12:28am UTC](https://community.glideapps.com/t/query-rows-via-api/75092/5 "2024-07-24T00:28:58Z")

</div>

I think you would have to create a custom form for that.

> [@How do I create a custom form?](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014):
>
> I’m just dropping this here so I have something to refer people to when they ask. This is a simple concept app (copyable), that demonstrates the following techniques: Building custom forms for adding and editing list items (as an alternative to the native forms provided by Glide) Preventing duplicate new entries using [User Specific Columns](https://docs.glideapps.com/all/reference/data-editor/user-specific-columns) and [Relations](https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column) Enforcing mandatory input items The use of visibility conditions and user specific booleans to control user flow There is nothing particular…

- Create an If-Then-Else column in your User Profiles table called “Parental leave days”. If “children under 12” is over X, then 12 days, else 10 days, structure your logic around this part.

> [@evazivanovic](#):
>
> The parental leave depends on the number of children the employee has under 12 years of age (norwegian legislation). It could 10 days it could be 12 etc.

- Back to your custom form’s helper table, you should have user-specific columns to hold the user’s type of leave request.
- Create a query column targetting the parental leave records table, filter by the user’s ID/email, and the type of request being the same as the one in your form.
- Have a submit button in your form. Have a custom action with as many branches of logic as you need. One should be “If query column is empty”, then add a parental leave record, before adding a leave request. Else just add the leave request.

---

_[View the full topic](https://community.glideapps.com/t/query-rows-via-api/75092)._
