How to execute task with user input independent of a record

Hi everyone! I’m new to swimlane. My company is about to buy an enterprise license and I’m one of the main admins. I’m currently exploring what can be done in a dev instance, and I’m having a hard time figuring out how to do the following (or if it’s even possible).

In a dashboard that a user is looking at, I would like to have a panel (a card?) that just has a simple text input box and a “search” button to execute a search on our EWS machine. This is possible within an app when some data is received, but I just don’t see how this can be done based on the documentation I’ve read. I suppose I could build a widget that maybe calls a task that executes this search and returns and populates the results, but this seems like something that is maybe doable without creating a custom widget.

Thanks in advance!

You can do this using a custom JS widget. from a Report > Charts > set type to Widget > Edit Widget.

Because of CORS limitations you - generally - can only talk to Swimlane from within Swimlane. To trigger this search you would create an input field and a button. On click, that button makes a POST web request to either trigger an integration or create a record elsewhere which you can use to trigger on record creation.

The former, Swimlane offers you abstraction with. See HERE. If you want better examples or starting points, reference and modify the Action Buttons example code. This shows you how to trigger a task by either its text name or it’s Task ID. You don’t even have to touch Fetch/XHR/a POST body!

The latter, there are no “Create Record” JS helpers, so you would make a POST request to create a record. To do this you need to first know other IDs (Application ID, field IDs and their types, etc). You can find Swagger API docs to create a record via POST request at https://your.swimlane.instance.tld/docs or, from within Swimlane, fire up F12 Dev Tools > Network tab > create a record within the Swimlane UI > and check the requests made.

Good luck!
Cody McGehee

1 Like

Thanks for the great response! I’m fiddling with widgets now :slight_smile: