# How to add actions to AI Components using JSON Array

**URL:** <https://community.glideapps.com/t/how-to-add-actions-to-ai-components-using-json-array/83865>\
**Category:** Ask for Help\
**Created:** [August 16, 2025, 9:41pm UTC](https://community.glideapps.com/t/how-to-add-actions-to-ai-components-using-json-array/83865 "2025-08-16T21:41:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryanp](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@ryanp](https://community.glideapps.com/u/ryanp)\
**Post date:** [August 16, 2025, 9:41pm UTC](https://community.glideapps.com/t/how-to-add-actions-to-ai-components-using-json-array/83865/1 "2025-08-16T21:41:28Z")

</div>

i have built a card list using an aray and have them all working, but i cant seam to get any actions to work. I have set up a helper table to build the JSON array and each object has the original tables UI, how can i have it go to detail page with action?

 ![Screenshot 2025-08-16 at 5.41.16 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/1/c16874546fbd091a8c31bd306322cb8bba246488.jpeg)

---

<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:** [August 17, 2025, 12:54am UTC](https://community.glideapps.com/t/how-to-add-actions-to-ai-components-using-json-array/83865/2 "2025-08-17T00:54:06Z")

</div>

What specific action is not working? Is it only the details page thing?

I think what’s missing here is not a single action per se, but two actions.

- Add a column called “viewingID” to your Users table. Add a relation to relate it to the right record in your table where you store records as shown.
- Add to your AI component an action to show the details screen of the relation you established above. Let’s call this “detailsView”.
- In your AI component, tell it to add a button and on click, first set the rowID to the “viewingID” column, then execute the “detailsView” action.

Why do we have to do this?

- AI Components don’t have the direct ability to show the details screen of a record (hence the detailsView action needs to be tied to it).
- Glide actions don’t have the context of what element you’re clicking on the screen (hence we have to set the rowID first).

---

<div class="post-metadata">

**Author:** ![ryanp](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@ryanp](https://community.glideapps.com/u/ryanp)\
**Post date:** [August 17, 2025, 4:10am UTC](https://community.glideapps.com/t/how-to-add-actions-to-ai-components-using-json-array/83865/3 "2025-08-17T04:10:47Z")

</div>

Thanks! ill give that a go!

---

<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:** [August 17, 2025, 9:30am UTC](https://community.glideapps.com/t/how-to-add-actions-to-ai-components-using-json-array/83865/4 "2025-08-17T09:30:20Z")

</div>

Let me know if it works!
