Create a form not related to any table in servicenow

Mudit4
Kilo Expert

Hi,

I have a REST API endpoint (not a servicenow API). I want to create a form and submit its data as a POST request to the API. 

One way of doing this, is creating a new table in servicenow with all the required fields. 

However, I dont need to save the data. I just want to POST it to the API. So, is there a way to just have text boxes on a new form without having them linked to a table? 

1 ACCEPTED SOLUTION

shloke04
Kilo Patron

Also if say you want to go ahead with a Custom widget and it should not create a record at all post submission then Custom widget is the best approach here.

Please find the links below which will guide you step by step on how you can create a Custom widget:

https://docs.servicenow.com/bundle/sandiego-servicenow-platform/page/build/service-portal/concept/adv-widget-tutorial.html

https://www.youtube.com/watch?v=HnWrNAlKbZw

https://www.youtube.com/watch?v=3eS2TcjeSM0

So say for example, within your custom widget create a HTML button and on click of that trigger your Rest integration to your 3rd party as you want.

let me know if you are stuck.

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

7 REPLIES 7

Uttkarsh S
Tera Contributor

Hi Mudit,

 

One way of doing this without creating any table is by utilizing catalog item, where you can create a form with all the input variables you want.

You can invoke your POST request API from flow/workflow and pass all the required variables.

 

Best regards,

Uttkarsh

Hi Utkarsh,

This could solve my problem! Can you share any documentation or steps to do this?

Hi Mudit,

 

You can follow the below documentation for creation of catalog items:

 

Create or edit a catalog item

 

Below is the documentation for using REST messages for your integration purpose:

 

Creating an outbound REST Message

 

Once you create a REST message create your POST method. In the method, you can either create the HTTP query parameters for each variable or create a dynamic payload from 'Content' field. See image below:

 

find_real_file.png

 

You can use the payload mentioned in content field to store all your variables from the workflow and invoke your POST method.

 

Best regards,

Uttkarsh

 

 

Rafal Rataj1
Giga Expert

a ServiceNow form, not really, 

but perhaps building a widget in Service Portal with a HTML form and a submit button that would execute the API call would be a solution for you. 

but it will be easier to use the table, if you do not need data stored you can delete the data with table cleaner, regarding licensing you could use an import table ...