API Workflow triggering before it's supposed to

Hey all, so currently I’m building a solution for the following scenario (example):

  • there’s a multidropdown input field where I can select from a wide range of “Snacks” (option set)
  • for each “Snack” option I select, a data thing needs to be created in the table “Favorite Snacks”

I’ve set up an API workflow to run on a list so that whenever I edit and change the list of my favorite snacks, it creates a “Favorite Snack” data thing for any new “Snack” I selected in the dropdown. To make this change, I have to click “Save changes” (cannot be auto-binding). The formula I’ve implemented is the following:
multidropdown snacks values minus list search for “Favorite Snacks” associated to this user’s each item’s “Snacks”

so with this, if i had snack A, B, C, D in the dropdown and i only had A and B associated to my user, when I click SAVE it should run the API call on the list “C, D” to create a “Favorite Snack” for each one of those

the problem i’m having is that the formula is ALWAYS returning empty. the data is getting created way before the API call is run.
so in the example of snack A, B, C, D is in the dropdown, the formula returns: dropdown[A, B, C, D] minus list userlist[A, B, C, D] = empty

to make sure i wasn’t going crazy, i deleted the API workflow that creates the data things and ran the exact same formula and that returned “C, D” as expected.

so it seems like when I add the API workflow, it’s triggering before it’s supposed to and making my formula not work. anyone deal with this before and have suggestions on how to resolve?

This topic was automatically closed after 14 days. New replies are no longer allowed.