# Clickable list from JSON Data

**URL:** <https://community.glideapps.com/t/clickable-list-from-json-data/74002>\
**Category:** Ask for Help\
**Created:** [June 10, 2024, 2:16am UTC](https://community.glideapps.com/t/clickable-list-from-json-data/74002 "2024-06-10T02:16:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mwza](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mwza/32/43529_2.png) [@mwza](https://community.glideapps.com/u/mwza)\
**Post date:** [June 10, 2024, 2:16am UTC](https://community.glideapps.com/t/clickable-list-from-json-data/74002/1 "2024-06-10T02:16:22Z")

</div>

Hi

I am building a list of KPI’s for a staff member performance review.

I am using AI to make suggestions for KPI measurements based off a job description.  
I have set up the AI to return a maximum of 10 “suggestions” and also have the results returned in JSON format.  
I now have a nice organised / presented list of suggestions.

What I want to be able to achieve now, is to present this list in a collection so that if the user wishes to include a suggestion in the actual KPI list that they are building, clicking the item will add a row to the appropriate table and add the appropriate values.

Possible? Appreciate suggestions. (PS. True No Coder here so please keep it simple 🙂

I looked at extracting values using Query JSON but I cannot do this dynamically. I would need to build out 30 columns to extract the 3 field values for each of the 10 “suggestions” and I am not sure that is worth the effort for what I am trying to achieve.

---

<div class="post-metadata">

**Author:** ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)\
**Post date:** [June 10, 2024, 3:47pm UTC](https://community.glideapps.com/t/clickable-list-from-json-data/74002/2 "2024-06-10T15:47:03Z")

</div>

> [@mwza](#):
>
> Possible? Appreciate suggestions.

Sounds like it!

Some screenshots of your app setup would help, too.

Specifically how your data tables and custom actions are configured. 🙂

---

<div class="post-metadata">

**Author:** ![mwza](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mwza/32/43529_2.png) [@mwza](https://community.glideapps.com/u/mwza)\
**Post date:** [June 10, 2024, 5:29pm UTC](https://community.glideapps.com/t/clickable-list-from-json-data/74002/3 "2024-06-10T17:29:47Z")

</div>

Thanks Andy

Think this will illustrate what I am trying to achieve.

**Role Table**

 ![CleanShot 2024-06-10 at 19.16.50](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/9/89309b389a0fcaef5cff3591a9c8d8665b9705cf.jpeg)

**KPI’s Related to Role**

 ![CleanShot 2024-06-10 at 18.51.27](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/0/f08c12f8703c17e8c6f5e65a13ef6e648edf284d.png)

**Action to Generate KPI Suggestions**

 ![CleanShot 2024-06-10 at 18.53.22](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/0/70263ed974aff0773a053c0cef695bf967dee1ab.png)

**Front End Goal**

 ![CleanShot 2024-06-10 at 19.00.12](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/1/91d3b88494ec23bc8916cae563ab69b5f595c59b.png)

I hope that is not confusing!

Happy for any guidance as to correct approach.

---

<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:** [June 11, 2024, 11:59pm UTC](https://community.glideapps.com/t/clickable-list-from-json-data/74002/4 "2024-06-11T23:59:32Z")

</div>

You should have a helper table.

- On entry to the Roles row, set the rowID of that role to a column in your user profiles table.

- Get a relation & lookup on the user profiles side to retrieve the suggested KPI JSON from the row you’re viewing.

- Add a new helper table, add 10 rows to it.

- Add a rowID column to the helper table.

- Add a lookup pointing to that rowID columns, basically getting all rowIDs in an array.

- Add a find element index column, find the current row’s rowID from the array of rowIDs. This will essentially give you an index.

- Build out a template column using the JSONata format, using the index we just had above.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/5/e548b8d4d3d778de65d9257a85e1d05a32dbe096.jpeg)

Say for $.metrics[0] you will get a JSON of the first task in your parent JSON. The template should be: $.metrics[{I}] with I being the index.

- Add a query JSON column to query the parent JSON with the template you just build.

- Add 3 columns of query JSON to get the corresponding name, criteria & goal.

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

Then you have them all lined out correctly, it’s just a matter of adding an add row button when users view these, to add the extracted name, criteria & goal to the KPI table.

---

<div class="post-metadata">

**Author:** ![mwza](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mwza/32/43529_2.png) [@mwza](https://community.glideapps.com/u/mwza)\
**Post date:** [June 12, 2024, 4:52pm UTC](https://community.glideapps.com/t/clickable-list-from-json-data/74002/5 "2024-06-12T16:52:05Z")

</div>

@ThinhDinh So appreciated! Works just as expected.

I had already built the helper table but the key for me was how to dynamically query the JSON and your solution provided the answer:  
 ![CleanShot 2024-06-12 at 18.34.14](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/d/ad347cd7daf287fe401fc4acf3d8e355d014439a.png)

Thanks again for the time and energy.  
 ![CleanShot 2024-06-12 at 18.39.04](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/b/fb6376166086d87d91450199e22c146b95e4701f.gif)

---

<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:** [June 12, 2024, 11:33pm UTC](https://community.glideapps.com/t/clickable-list-from-json-data/74002/6 "2024-06-12T23:33:20Z")

</div>

Great to see!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [June 19, 2024, 11:33pm UTC](https://community.glideapps.com/t/clickable-list-from-json-data/74002/7 "2024-06-19T23:33:34Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
