LabTech Support Forums

Make parameter required

This forum is for discussion of script related issues.

Moderator: jware.connectwise

Make parameter required

Postby brink.totalbusinessware » Sun Jan 22, 2017 9:23 am


I am writing a script that will be run by a technician, not scheduled. It has an ask at runtime parameter. I've trapped using "variable check exists" in the script but I would like to get ahead of the problem. Is there any way to stop the tech from running the script if they forget to supply the parameter?

In other words, can we make parameters required to launch a script?

Posts: 5
Joined: Thu Dec 15, 2016 11:06 pm

Re: Make parameter required

Postby teamits » Mon Jan 23, 2017 6:36 pm

If you have it prompting (a Parameter is set on the Globals and Parameters tab) and the tech is ignoring that, talk to the tech. :)

I have used Variable Check for "variable not = (blank)" to check which is basically the same as yours.
Hero Member
Hero Member
Posts: 1578
Joined: Wed Dec 31, 1969 8:00 pm

Re: Make parameter required

Postby ian.integra-xp » Tue Jan 31, 2017 11:29 am

Good programming practice: never, ever, ever, trust the user to do anything the way you expect. One exception: always expect the unexpected.

You should always sanitise your inputs. check everything and then ask someone else to try and break your script.
-- Ian Murphy
Hero Member
Hero Member
Posts: 571
Joined: Tue Nov 15, 2011 12:29 pm

Return to Scripts

Who is online

Users browsing this forum: No registered users and 2 guests