Trigger Limit / Loop Workaround Options

There are many points in my app in which I have to use the “while loop workaround” of a bunch of on-step enter steps but I now have multiple instances in which I’m hitting the 100 trigger limit, and I’m not in an infinite loop, it’s just the nature of the operation, and in most cases is exacerbated by the lack of nested-if statements. So I’m obviously pushing up against / exceeding the limits of what “native” Tulip can do and I am wondering what would be the best direction to go for expanding functionality, particularly more advanced logic. I’m performing a lot of Tulip Table querying and combining results from multiple tables into one array or a new “temporary” table for displaying information in a different way. I need to to be able to read from and write to Tulip Tables and the number of traditional Tulip triggers happening is in the hundreds although performing the same actions in Python or any traditional programming language would probably be ~50 lines or less of code.

Would writing the logic within a connector be the best way to go forward? I thought there was a limitation with connectors only being able to return variables that I’d then have to write to a Tulip table. Would using node-red as my “language” and a connector work? Some other option?

Thanks for the input!

To facilitate the work of our “Apps Builder” we imagine creating micro-services that we can call using connectors. Our first tests were carried out with NodeRed (in the Cloud) with success. Maybe a good way to mix code with no-code and help our « citizens developer » to focus on create value on the ShopFloor without code skill

hello @Ethan, thanks for your question.

using NodeRED can indeed increase Tulip functionality by allowing you to run logic external to Tulip. there are some interesting examples in here: March 2021 App Competition [Node-RED] - #2 by Alan.Madorin if you’d like to take a look at how users are using NodeRED.

I do want to point out that in Release 205 (going out on 2021-04-11T23:00:00Z), we’ll be adding the ability to filter Table Queries with Arrays from apps: Table Queries functionality "in" and "not in" - #2 by gio. am I correct in thinking that this will eliminate the need for you to loop??

depending on the exact situation, this could indeed be a solution. for example, this QR Code is generated within a SQL Connector: Generating a QR Code or Barcode. I’d also like to point out that users sometimes use Connectors with the Table API (connected to their own instance), more information can be found here: How can I load unique field(table) values into dropdown list - #2 by gio.

hope this helps, let us know if you have further questions!!

Youri, this is exactly what I am looking to implement. Could you (or @gio) provide some more information on how you have this set up? You have a Node-Red program running in the cloud (Azure or AWS or something?) and then you are contacting your Node-Red program via an HTTP connector from within Tulip? And you access your Tulip data from within Node-Red with the Tulip API GET, POST, etc.? Most of the Node-Red documentation in Tulip seems focused on the Edge-MC which I won’t be using.

Hi, you can host Node-Red where you want, you can use also entreprise service as https://fred.sensetecnic.com/
Yes we use HTTP node un Node-Red to create endpoint and return response payload. On Tulip HTTP connector is use to call (POST or GET) Node-Red EndPoint.

Other service as Google CP functions can also do the job. But as you plan to use Node-Red at edge we prefer use same tools