Basically, I have a function that does some work. I want to pass it a couple parameters, but all the work is done within the function. How do I call it from an Action in a Trigger?
When you create the function there should be that "Options" section in the function definitions.
Click on it, and see that a dropdown will be there for it, with a bunch of checkboxes under it. In the dropdown, select "Action" - this causes the function to show up in the actions list when adding actions to a trigger, and makes it so that a return value will do nothing.
Depending on your action, you can also look at "Create Thread" in the checkboxes. If you want the calling trigger to *wait* for the function to finish before continuing with it's actions, keep this unchecked - but if you want to call the action asynchronously (At the same time as the calling trigger), then check this and it will be ran in it's own thread.
Basically, I have a function that does some work. I want to pass it a couple parameters, but all the work is done within the function. How do I call it from an Action in a Trigger?
Thanks
You just create a new action and search for it, it should be right there
@Magnevv: Go
While I appreciate that the answer might be obvious, I have looked for it. At least give me what Label it's under?
-Sam
When you create the function there should be that "Options" section in the function definitions.
Click on it, and see that a dropdown will be there for it, with a bunch of checkboxes under it. In the dropdown, select "Action" - this causes the function to show up in the actions list when adding actions to a trigger, and makes it so that a return value will do nothing.
Depending on your action, you can also look at "Create Thread" in the checkboxes. If you want the calling trigger to *wait* for the function to finish before continuing with it's actions, keep this unchecked - but if you want to call the action asynchronously (At the same time as the calling trigger), then check this and it will be ran in it's own thread.
Hope this helped!
@nZifnab: Go
Thanks nZifnab, that's exactly what I was looking for!