# Trigger step to query for a table value? Also some dumb questions

**URL:** <https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372>\
**Category:** Support, Troubleshooting, & Help\
**Created:** [April 7, 2021, 6:23pm UTC](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372 "2021-04-07T18:23:58Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![JasonMcD](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/jasonmcd/32/1849_2.png) [@JasonMcD](https://community.tulip.co/u/JasonMcD)\
**Post date:** [April 7, 2021, 6:23pm UTC](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372/1 "2021-04-07T18:23:58Z")

</div>

Hi Tulip Community!

I am pretty new to Tulip and diving head first into this, so I’m sorry if I ask some really obvious questions. I’ve been searching the KB and this forum to get up to speed, but I am still struggling.

First, the actual question.

I am trying to make a trigger so that

1. When a user clicks a row in a grid in an app
2. Store a field from that row in a variable
3. Look up the field in a Tulip Table (FirstOrDefault kind of thing)
4. Return that value in a variable

How do I do that? Can I query a Tulip Table with a where clause or something? I know the table in question will return multiple rows but I just want one value. They should all be the same value, so the first one is just fine.

I think something like this?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/d/d931dc2e55a0a3eb630943f712192c32c6b97ec1.png)

Where `'My String'` is some useful code.

And then my first really newbie question: These expressions - what language/syntax is this?

Oh, and by way of introduction, I work with @MikeRousch.

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [April 7, 2021, 6:41pm UTC](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372/2 "2021-04-07T18:41:44Z")

</div>

hello @JasonMcD, thanks for the introduction. welcome to the Tulip Community!! this is certainly the right place as you learn the platform. feel free to go introduce yourself also here: [Welcome to the Community, let's meet!](https://community.tulip.co/t/welcome-to-the-community-lets-meet/738) also!!

regarding your question, what are you referring to with the grid in your app??

if you embed an Interactive Table, you will be able to link a Table Record Placeholder directly to that Interactive Table that will pull all information everytime a Record is Selected. here’s a quick example:

Interactive Table (note the Record Placeholder on the left and the Linked Record on the right):

 ![Screen Shot](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/3/38a53dcb89e80dd9fa24d4cba2846d3733e34a81.jpeg)

at this point, each time a Record is selected, all the information in this Record is made available in the App:

 ![Screen Shot 1](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/d/d8d9bd86db0abd4122dea4e36528fb4ba8ddf461.jpeg)

 ![Screen Shot 2](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/f/fb88d7cc6ae1e80cd78c8df24e7d4b9573e276db.jpeg)

furthermore, you can add a Trigger to execute every time a Record is selected. in this example, it’s showing a message, but you could just as easily Run a Connector Function:

 ![Screen Shot 4](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/e/e65a5da68ea2385ef3248f209c905a4390346e66.jpeg)  
 ![Screen Shot 3](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/8/88920c543b5f1b15f69622dcdf823f372f964110.jpeg)  
 ![Screen Shot 6](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/9/9790cbe700dc68b889adaaa9e7829a40b690e778.jpeg)

here is some useful documentation on the Expression Editor: [Technical Details of the Expression Editor | Tulip Help Center - Support for Building Manufacturing Apps](https://support.tulip.co/en/articles/2864695-technical-details-of-the-expression-editor).

finally, if you’d like to join Office Hours, here’s the sign up link: [https://tulip.co/office-hours-est/](https://tulip.co/office-hours-est/).

hope this helps, let me know if we can clarify something!!

---

<div class="post-metadata">

**Author:** ![JasonMcD](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/jasonmcd/32/1849_2.png) [@JasonMcD](https://community.tulip.co/u/JasonMcD)\
**Post date:** [April 7, 2021, 7:56pm UTC](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372/3 "2021-04-07T19:56:16Z")

</div>

> [@gio](#):
>
> feel free to go introduce yourself also here: [Welcome to the Community, let’s meet!](https://community.tulip.co/t/welcome-to-the-community-lets-meet/738) also

Ah, excellent, I was wondering if someone had started a thread for that. I will do that next.

> [@gio](#):
>
> what are you referring to with the grid in your app

Interactive Table. You guessed right. Sorry I forgot the name and there are a lot of things (too many, I think) called “Tables.”

OK, so I need to back up because I think I led you down the wrong path.

1. Our BOM info is in our ERP, and I am gung ho about keeping it there and not in a Tulip Table.
2. Our ERP (Epicor) uses REST, so I am making the connectors REST-based, and I have become pretty good at that, I think.
3. So my Interactive Table is populated from a Variable output of a Connector
4. Plan is, click on a row in the Interactive Table and **open a specific Tulip App based on the row selected**

I got through step 3.

Here is the snag: I need to look up what the app name is.

We have a Tulip Table that cross-references these pieces of info (“KitID” to App name). But how do I call to it?

I made a query on the Tulip Table to use app input and return only one row. But can I call that query from an app? (It sure sounds like it…)

---

<div class="post-metadata">

**Author:** ![JasonMcD](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/jasonmcd/32/1849_2.png) [@JasonMcD](https://community.tulip.co/u/JasonMcD)\
**Post date:** [April 7, 2021, 8:10pm UTC](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372/4 "2021-04-07T20:10:16Z")

</div>

Ahh… Can you call the Tulip Table API from Tulip?

> **[How to Use the Table API](https://support.tulip.co/en/articles/3983173-how-to-use-the-table-api)**
>
> Set up and use the Tulip API to interact with Tulip from other systems.

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [April 7, 2021, 8:12pm UTC](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372/5 "2021-04-07T20:12:56Z")

</div>

great, I saw you introduced yourself @JasonMcD - welcome once again!!

OK, thanks for clarifying!! I now have a better idea what you’d like to build.

have you Linked a Variable to the Interactive Table?? once that’s done, you can access elements from the selected Record.

I called my Variable `Selected Item`:

 ![Screen Shot 2](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/2/286a306db7faf0525badf5bffddcc0bc9ce9d402.jpeg)

as you can see, we can now access that Variable when a Record is Selected in the Interactive Table:

 ![Screen Shot 3](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/4/4e254f90cb4329c76107bfc0a8e6e38a109998c7.jpeg)  
(available options):  
 ![Screen Shot 4](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/d/d2bcafaebc13a80743c485bcce83598a963fffed.png)

I do not have an App named `Table` in my instance, but it would open it if it existed:

 ![Screen Shot 5](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/d/d13207f6abd53c70e26af4716db47608bc0181cc.jpeg)

does this help what you’d like to build?? let us know!!

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [April 7, 2021, 8:14pm UTC](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372/6 "2021-04-07T20:14:11Z")

</div>

while it’s not really what the Table API is intended for, you can use it if necessary.

---

<div class="post-metadata">

**Author:** ![JasonMcD](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/jasonmcd/32/1849_2.png) [@JasonMcD](https://community.tulip.co/u/JasonMcD)\
**Post date:** [April 7, 2021, 8:15pm UTC](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372/7 "2021-04-07T20:15:02Z")

</div>

> [@gio](#):
>
> I do not have an App named `Table` in my instance, but it would open it if it existed

Right there is the problem.

My row is 100-0021  
The app name is 100-HydraulicTank

So I can’t use “100-0021” to open the app.

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [April 7, 2021, 8:17pm UTC](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372/8 "2021-04-07T20:17:40Z")

</div>

ahh OK, you can use the Expression Editor to build the name of the App as needed. for example, this would build the string you need:

 ![Screen Shot 6](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/3/3639058ffcfa225fa880f7df131bc59893eebaca.jpeg)

---

<div class="post-metadata">

**Author:** ![JasonMcD](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/jasonmcd/32/1849_2.png) [@JasonMcD](https://community.tulip.co/u/JasonMcD)\
**Post date:** [April 7, 2021, 8:21pm UTC](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372/9 "2021-04-07T20:21:57Z")

</div>

> [@gio](#):
>
> you can use the Expression Editor to build the name of the App as needed. for example, this would build the string you need:

Oh sure, if it was that easy. But it’s more like this:

![image](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/e/e2a8d80391fa1b1d2b55640513c8dd584a76c679.png)

- Kit ID is the row in the Interactive Table
- WI is the app name
- The correlation is in the Tulip Table in the pic

I need to make a call to the table to translate Kit ID to App name.

---

<div class="post-metadata">

**Author:** ![JasonMcD](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/jasonmcd/32/1849_2.png) [@JasonMcD](https://community.tulip.co/u/JasonMcD)\
**Post date:** [April 7, 2021, 8:29pm UTC](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372/10 "2021-04-07T20:29:12Z")

</div>

I mean, I get it, we would save ourselves a lot of time if the App names were the same as the Kit IDs.

But the App name is the only place to put a description in, right? Please correct me if I am wrong.

So when the app runs, it would look like this, which is not very descriptive.

IDK, maybe that’s a change we just have to make.

![image](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/5/5c9977d16d3246d165b64775fe9d976b0bc40f95.png)

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [April 7, 2021, 8:29pm UTC](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372/11 "2021-04-07T20:29:50Z")

</div>

OK, you can access any the `WI` in the object once you’ve linked it to the Interactive Table in the Expression Editor (without having to call the Table). in your App, you will see the same but `@Variable.Selected Item.WI`:

 ![Screen Shot 10](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/d/d0fe0cde7060944fde6791a1a8003f73dde3640b.jpeg)

but this may be better to address in Office Hours. are you available tomorrow at 11AM EST?? if so, registration link is [here](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372/2).

---

<div class="post-metadata">

**Author:** ![JasonMcD](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/jasonmcd/32/1849_2.png) [@JasonMcD](https://community.tulip.co/u/JasonMcD)\
**Post date:** [April 7, 2021, 8:41pm UTC](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372/12 "2021-04-07T20:41:10Z")

</div>

> [@gio](#):
>
> once you’ve linked it to the Interactive Table

I see. I think you are saying that I would need to bring that correlation Table into the app? It will eventually have thousands of rows.

I guess - maybe - that’s an option, but I only need a single value from it.

OK, well that has been a lot of help and I will chew on this.

I’m fond of the API way because I think it would get me there faster.

But I think reevaluating our table structure may be a more long-term solution.

Thank you for all of your help @gio

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [April 7, 2021, 8:50pm UTC](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372/13 "2021-04-07T20:50:29Z")

</div>

no problem @JasonMcD!! great to see you getting into Tulip so quickly.

yes, the Table API certainly opens a lot of opportunities. and creating good Table structures is important for the platform to work well, let us know how it goes!!

---

<div class="post-metadata">

**Author:** ![JasonMcD](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/jasonmcd/32/1849_2.png) [@JasonMcD](https://community.tulip.co/u/JasonMcD)\
**Post date:** [April 10, 2021, 12:24am UTC](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372/14 "2021-04-10T00:24:50Z")

</div>

To close the loop on this, we had a eureka moment today. We plan to move the kit ID table to the ERP system, so that I can cross-reference it ahead of time and have it in the connector ready to go.

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [April 10, 2021, 7:53am UTC](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372/15 "2021-04-10T07:53:59Z")

</div>

that’s a great to hear @JasonMcD, that seems like a good solution!!

it would be awesome if you could share how the integration works on [Show and tell - Tulip Community](https://community.tulip.co/c/show-and-tell/9) as I know there are other users looking into to connecting to EPICOR (including @hwagner).

thanks for posting!!

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [April 10, 2021, 7:54am UTC](https://community.tulip.co/t/trigger-step-to-query-for-a-table-value-also-some-dumb-questions/2372/16 "2021-04-10T07:54:02Z")

</div>


