Multiple Rows Entered not triggering automation

Is there a way to get any logs on automations? Not sure how to debug this case.

I have a series of automations set up for tracking and adding new rows added to tables.

The flow works all the way until the second time Automation 1 is ran; after Automation 2 creates a row in Table 1.

  1. Automation 1 works the first time copying over the App created row in Table 1.
  2. It fails though after Automation 2 creates the row in Table 1. Automation 1 just never runs again.

There are no conditions on Automation 1.

Automation 2 does have a rule set to only create rows in Table 1 if a specific criteria is met, so there's no infinite loop case here.

Not sure if there's any restrictions on chained automations, but

Thanks,

1 Like

Hi @Dee-Jay, Great question and thanks for adding the flow diagram. As you insinuated, this is due to the circular nature of the automation. Currently if the circular dependency is detected, Honeycode will not execute the automation to prevent run away automations. Perhaps the dependency could be broken so you can achieve the same outcome if you can share the details of the workflow?

Thanks

Hi @Kamran, thanks for the comment.

I can spell out more of the details for you. i'm thinking the table names and key fields should be sufficient.

The goal is to recursively add ingredients to an order based on recipes and ingredients that are also recipes.

Let me know if you need any more details. Thanks!

@Kamran is there documented anywhere how circular dependencies are determined? I can adjust the business requirement and logic flow probably to make the feature work, but it'd be pretty clunky and a headache to maintain.

I'd also be to some degree guessing and hoping it works, not knowing if the idea will run into the similar problems.

Otherwise, is there a design pattern to handle use cases that require recursion? If there is, we wouldn't have to recreate the wheel.

Thanks!

Hi @Dee-Jay,

Thanks for sharing the additional details on this -

I wanted to follow up to let you know that I've reached out to our team to add information to resources on our forum around circular automations. (As @Kamran noted, the restrictions around circular automations are in place to prevent infinite loops and runaway automations)

We also are evaluating the request around implementing logs, that provide more debugging details to users, into a future update of Honeycode. (This has been requested by others as well).

In regards to a solution, I may need more information in how your tables and apps are set up, but I'm wondering if you could do that check that is happening in the second automation in the very first trigger (the trigger in the app that adds the row to Table1).

From what you've described and your picture, it looks like if a certain "Ingredient" in a "Recipe" is also a "Recipe", then it should also be added to the order. If that's the case, if you have a table of "Recipes", you can add another action to your app automation with a FILTER() formula in the "Run Options" that checks to see if there is a match in the Ingredients of the submitted "Recipe". If it returns true, have it also add to the order. This solution wouldn't require the second automation, and you wouldn't run into this problem of a circular automation.

Let me know if that makes sense and helps. Feel free too to share more info about how your automations and apps are set up, and we'll be happy to help. :slight_smile: :honeybee:

@Alyssa Hm, that's interesting, so you'd be consolidating Automation 2 into Automation 1. After the rows are initially entered, adding another action with a filter against the table checking for the new rows and if there's to be added additional recipe rows to Table 1.

That could work theoretically, but would that still fail under a circular automation scenario? It's just instead of Automation 2 adding a row and triggering Automation 1, it'd be Automation 1, adding a row and retriggering Automation 1.

Hi @Dee-Jay,

Thanks for the quick reply here -

I was referring to the initial action in the app that adds the rows to Table1 (so not consolidating into automation 1 as you are showing here, but instead modifying what data is initially added into the table). That being perhaps being on a button in the app.

Would you be able to provide info / screenshots of the automation of that button or initial trigger in the app that adds a row to a table?

Also, if you provide more information about how your app and tables are set up, it would be easier to help give suggestions. :slight_smile:

Hi @Alyssa

Here's the updated flow showing table names and initial action.

Here's the Recipe_Ingredients table showing the relationship between recipes, ingredients and ingredients which can also be recipes; DOUGH Cornmeal Recipe contains White Levain which has it's own recipe

Here's how the Orders_Recipes_Ingredients table should be storing the Recipe and Ingredients and Ingredients that are also Recipes. Order 53 contains DOUGH Cornmeal therefore needs to track DOUGH Cornmeal Recipe and it's ingredients which also needs to track White Levain Recipe with it's own ingredients.
OrdersRecipesIngredients___Amazon_Honeycode

Let me know if you have any questions, there's a lot of moving pieces here. Thanks!

Hi @Dee-Jay,

Thanks for your follow-up here! And also for your patience -

I re-created your app and wrote an automation in a button that writes to the two tables you specified, and has an additional action that checks if an ingredient in a recipe is also a recipe, and adds it to the second table if it is (checks with a formula in the Run Options).

The goal here was to reduce the amount of automations, so I wanted to set up one up that initial button trigger with a few actions to achieve what you're looking for.

I also wanted to show you my thinking in how I set up the Tables in the workbook, which may be helpful in 1) how you manage and organize your data in your apps, and 2) allowing you to more easily call and display desired data on a screen.

So first, I'll show you how I structured my tables to help create parent-child types of relationships for the recipes and ingredients.

The Recipe_Ingredients Table has all of the ingredients for each recipe, which is a dropdown to a Recipe table:

There is an additional column for validating if the ingredient is also a recipe:

Note: This check is relevant to the formula you would enter into the "Run Options" of an automation action, to see if an ingredient is also a recipe.

In the Recipe Table, I have columns with different filters of a given recipe's ingredients. The nice thing about setting up filters like this, is that it makes it easier to call and display that particular list of data an app:

I've also set up an Order_MenuItems_Recipes table and Orders_Recipes_Ingredients table with the same key columns you noted:

Order_MenuItems_Recipes table:

Order_Recipes_Ingredients table:

Now that I've shown those key tables, I'll show you how the automation was set up on the button:

On the Add button, I've set up just three steps for the actions:

The first action, adds a row to the Order_MenuItems_Recipes table. Taking data from the Order Number, Menu Item, and Recipe from the screen and writes to the according columns:

The second action, adds a row to the Order_Recipe_Ingredients table, taking data from the Order Number and Recipe.

And the third action, has a formula in the Run Options that checks if the ingredients in the Recipe are also a recipe:

Screen Shot 2020-10-02 at 4.03.10 PM

As a result, when I click on the button, it will write to both the Order_MenuItems_Recipes and Order_Recipe_Ingredients, and it will write to the Order_Recipe_Ingredients table again with any of the ingredients that were recipes. In this case, Guacamole and Shredded Cheese were in the ingredients and are also recipes.

Order_MenuItems_Recipes table:

Order_Recipes_Ingredients table:

And for a last note, I mentioned how creating filters can make it easier to display data on the screen. I'll just quickly show you what you could do, based on what I did while I was I testing this app:

On the screen, I set up some lists based on filters I created in the table. These lists show the parent and child recipes, and if you click on each, they will show you the ingredients for the selection:


I hope all of this info was helpful! There's different ways to achieve goals like this, so I hope that from this, you can take away concepts and apply it to your own app. :slight_smile: :honeybee:

1 Like

@Alyssa this is interesting. So you moved a validation that was done with an automation to a filtered column and added an action to the trigger automation.

Question for you. How would you handle the case if Guacamole / Shredded Cheese also had their own Ingredient Is Recipe Status? I can see this approach working for 2 layers of recipes, but couldn't figure out a way to make it recursive to account for recipes of unknown depth. Any thoughts on your side?

Thanks!

Hi @Dee-Jay,

Following a similar model of what I built, you are able to set up additional steps to continue to check more layers, if those are defined and known (i.e. another parent or child layer).

I verified with the team that you can only continue this concept if the depth is known. As Honeycode is today, it will not allow for recursion of unknown depths, for the reasons we provided earlier in the thread.

I've been in touch with the team about your use case though, and I'm happy to pass it along as an improvement request for Honeycode to perhaps better support recursion.

Let us know if you have any other thoughts on what you'd like to see around this, and I hope the example I provided helped and can show you a way to build your app :slight_smile: :honeybee: