script-server
script-server copied to clipboard
Possibilty to use UI Value in scritpt
Hello Is it possible now, or maybe in future version to use UI value in script. Let say i have a script that calls some api with parameter os (values 1,2,3) So I created parameter (list type) with ui mapping 1 - server 2012 2 - server 2016 3 - server 2019
So question is, can i use this defined UI value later on in script, so that it will inform me that i have selected server 2016 not option 2 :)
Hi, i don't fully understand, why do you need ui mapping at all. You can define only "server xyz" values and skip ui mapping
Now I don't understand :) I have an api that need numeric values. In other script language (i.e. python or powershell ) i should be able to solve it internally (using hash table or arrays), but unfortunately my script is in bash and im not so proficient in bash :( That's why i need chose server 2016 but pass 2 as a parameter to api.... And its working usinig ui mapping , but for informational purposes i want to send some kind of summary and will be easier for me to use value server 2016 in that mail.
Ah, I see. Unfortunately that's not possible :(
Hello Its not possible now ? Or not possible because of some internal logic at all ? Im sure it can be quite useful option...
Anyway i noticed another strange issue with list parameter. If you have list for parameter that is not required and you accidentally choose one of the option , you cannot switch to choose you option entry. Pictures below.
Hi @kodifan this is not possible at the moment.
Regarding "unselecting", yes, this is a known issue
ok :) fixing "unselecting" is on your roadmap ?? it will be fixed in near future ? its quite frustrating. regarding ui value i have an idea to like set additional env variable for each parameter with UIVALUE prefix or something that we can use in scripts later on :) but im sure you know better how to do it :) thanks for fast replies :) its a great piece of software that you have created btw, i was looking for something like this for a long time (especially for bash scripts, for powershell scripts i use script runner)
fixing "unselecting" is on your roadmap ?? it will be fixed in near future ?
it's on a roadmap, not for the nearest future though, unfortunately.
Regarding UI values mapping, I would need more feedback from different people and different use cases, before implementing any change.