When scheduling API Workflow on a list, is there a way to send additional variables in addition to the list?
My database includes a “course” type, which contains a list of the “session” type. On the course creation page, I compute all the dates of the "session"s, (using JS I found in this forum) but saw that it takes a lot of time to add them to db. That’s why I thought it was appropriate to transfer the assignment to Bekand. The problem is that in addition to the date list, I need more information: the course to which the session should be added, etc.
I thought it might be right to set a temporary type to store all the necessary information, but I still had a problem - how would the API Workflow know which of the temporary records to access?
I would love if anyone has a workaround.
1 Like
-
You’ll need to change your design from API workflow on a list to just API workflow
-
You’ll need to call this workflow recursively (it calls itself at the end)
Solution A:
a) Create a temp table of just course and session and load it with all needed records
b) feed one record off that list in each successive cycle of the recursive workflow (insert to final target->delete off temp-> terminate if temp count = 0 -> call itself again)
Solution B:
a) Same recursive workflow, but instead of a temp table, the workflow first checks for the top-most course that has not yet been recorded to the target (select source courses where does not exist in target).
b) The recursive workflow then writes it to the target table while also doing a complex search to determine the session (Session = Do A Search For). Terminate if no further unwritten courses exist from the source (count = 0). Call itself again.