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

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?

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.

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! 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):

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

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:



here is some useful documentation on the Expression Editor: Technical Details of the Expression Editor | Tulip Help Center - Support for Building Manufacturing Apps.

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

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

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

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…)

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

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:

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


(available options):

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

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

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

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.

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:

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

image

  • 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.

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

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:

but this may be better to address in Office Hours. are you available tomorrow at 11AM EST?? if so, registration link is here.

1 Like

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

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!!

1 Like

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.

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 as I know there are other users looking into to connecting to EPICOR (including @hwagner).

thanks for posting!!

1 Like