Skip to main content
Jamf Nation, hosted by Jamf, is the largest Apple IT management community in the world. Dialog with your fellow IT professionals, gain insight about Apple device deployments, share best practices and bounce ideas off each other. Join the conversation.

More script parameters!

Currently only parameters 4 through 11 are available. Can you make it go to 20? Or better yet, unlimited where you can click on a + button to continue to add parameters as needed.

Comment
Order by:

Posted: by calumhunter

a few more would be good or even the option to add as many as you like (within reason)
But perhaps rather than that add 50 parameters to a script there is a better way to achieve your goals.
Do you have a specific reason for needing to pass more than 7 parameters to a script?

Like

Posted: by mm2270

I was kind of thinking the same thing as @calumhunter when I read the FR yesterday, but wasn't quite sure how to state it. I guess I understand in general why you may want a few more. There may have been one or two possible occasions when I would have liked an additional parameter field, but I think in general Eight is enough. (Oof! Sorry for the old 70's TV show reference)
I think if you find yourself needing more than that very often, you might want to rethink how you've built some of your scripts.

Like

Posted: by bpavlov

Well as an example, I have some scripts that I like to make somewhat "universal" in that the script does one function and does only that, but it's customizable in that it makes use of the script parameters. One such script looks at running background processes. While most applications/suites may have one or two processes running, there may be others that have more. I haven't run into the issue but wanted to avoid it if the problem ever came up.

Plus I think 8 is rather arbitrary. Hence why I asked for 20, but ideally the ability for anyone to just add as many as they want.

Like

Posted: by bpavlov

I know this is a bit of an old request, but I've recently gotten into scripting a lot more and trying to make use of JSS parameters. Unfortunately, the current limit is...limiting. I'm not sure how often this feature is used by others but I think it's perhaps one of the better features in the JSS. Even if it's just a few more parameters, it would be so helpful. I'm finding myself hitting the limit on 2 scripts which I've made as generic as possible for JSS parameter use. And where possible I try to make it so that I can perhaps hold multiple values by attempting comma separated values and gathering that into an array. But it's not fun.

Like

Posted: by marklamont

this could be useful. some of the scripts we use have multiple modes fed by input variables, including things like; apiusername apiuser password
script mode
debug on/off
plus all the script specific ones.
If I had been able to pass more variables I could have had less hardcoding.

Of course you can use tricks like | delimiting strings and splitting them but being able to add more if required would be good

Like

Posted: by bpavlov

Once again, I've got another 2 scripts I've been working where I've run out of JSS parameters. And I tried to optimize the 8 JSS parameters we have available by delimiting strings. PLEASE implement this. It's the only way to stay sane and extend the functionality of the JSS.

And while I'm at it, please consider all these other JSS parameter improvements:
https://babodee.wordpress.com/2017/03/07/jss-parameters

Like

Posted: by ajacks88

We've ran into this as well, would be nice to be able to add some more.

Like

Posted: by bpavlov

Giving this a bump as I've been running into this issue and it's frustrating to deal with.

Like

Posted: by MandyDroid

Love the idea of more parameters. Not all thoughts fit in 160 characters - LOL

Of course I make twitter joke .. but yeah more options always better and more flexible.

Like

Posted: by bpavlov

@milesleacy I've done something similar where you just basically end up creating an array. But it's a workaround as you mention. And also, parameters have character limits!

https://www.jamf.com/jamf-nation/feature-requests/5797/increase-character-limit-for-parameters-to-65535

I wish whoever focuses on the Parameter feature in Jamf Pro would look at some of the suggestions I've made for it because it's a great feature that could be made even better.

Like