Node JS

PUG Switch Case Statement Demo using Node JS and PowerShell

Posted on

A friend of mine asked a very good question “How can I use switch case statement in PUG using variable from route?” which took an hour time to figure it out! See the documentation for case statement here. I have a route like shown below

As usual we are calling the PS script which […]

PowerShell

Download servicenow Incident attachment using PowerShell

Posted on

Of late I received a request to share a PowerShell script to download attachment(s) from the given servicenow incident. Two attachments are available for the sample incident INC0010008 below is the illustration. First we need to query incident by number to retrieve sys_id and through which we get the attachment metadata. Table name incident and table_sys_id are used respectively. […]

Node JS

TIP: Node JS PUG Conditionals

Posted on

Recently I was working on a tiny project in which I need to make text field as READONLY when it’s backfilled by query and FREE TEXT if empty. Yes, as you guessed I use PowerShell a lot at my workplace. Having said that, let me show case the demo using PowerShell and Node JS Scenario […]