Building ServiceNow forms with React

  • Effectively works with thousands of records
  • Interactive real-time filtering, infinite scrolling
  • Can be easily modified to address custom requirements and styles
  • ~130 lines of code

How to install and run examples locally

  1. Clone the repo https://github.com/elinsoftware/sn-fields-example
  2. Run npm install
  3. Update ./webpack/servicenow.config.js with the ServiceNow instance name, user name and password - this is required to run the app locally
  4. Run npm start
  5. The application will be available at http://localhost:9000/
<ReferenceField 
table="sys_user"
primaryField="name"
secondaryField="email"
placeholder="Select a user..."
onChange={handleUser}
icon="diagram-tree"/>
  • table — ServiceNow table to pull records from
  • primary field — primary field to be used for filtering
  • secondary field — secondary field to display in the list
  • placeholder — text to display when nothing selected yet
  • onChange — function to be triggered when a record selected
  • icon — blueprintjs icon name (https://blueprintjs.com/)

ServiceNow Dropdown field component

  • Based on ServiceNow Table API
  • Can be easily modified to address custom requirements and styles
  • ~30 lines of code
<DropDownField 
table="task"
field="state"
placeholder="State"
icon="diagram-tree"
onChange={handleChoice}/>
  • table — ServiceNow where the dropdown defined
  • field — ServiceNow field name
  • placeholder — text to display when nothing selected yet
  • icon — blueprintjs icon name https://blueprintjs.com/
  • onChange — function to be triggered when option selected

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Simple Augmented Reality(AR) Integration with A-FRAME

High Order Functions in TypeScript

Why TypeScript is cool.

Flutter vs React Native

Serverless — Serverless Stack Web

How To Run VueJS With NodeJS Backend on AWS App Runner

TryHackMe — BasicMalware RE Write-up

Bulletproof Your JavaScript App Integrity for Free with Blockchain — Integration Available on NPM

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andrew Pishchulin

Andrew Pishchulin

More from Medium

Why learn React?

The Most Important Thing You’ll Ever Learn for React: useState

A coding example of useState

Show Google Calendar events in Fullcalendar with React

Learn Next.js setting up & routing in no time