How to make variables non editable?

ishaanvohra
Kilo Contributor

Hello,

I have created a catalog item using scripted rest api and add variables to catalog items using scripted rest api.I have provided the default values to these variables, so that anyone who wants to order that catalog item can go through the info stored in those variables.These variables look like this in service catalog when I open my catalog item to order it.

                                                Screen Shot 2017-11-28 at 2.58.58 PM.png

But what is happening now that values of these variables are editable, as anyone can edit these values and can change the info before ordering for the item.I don't want that.So is there any way to make these variables non-editable while displaying in service catalog,so that values of these variable will remain read-only and no one can edit it except system admin?

Please suggest me the way to do that.

11 REPLIES 11

Hey Ishaan,



I am afraid if you achieve that because here we are not dealing with variable sets. As you said you are getting the fields dynamically it would be a tough challenge and may cause issues later. In case you donot want to copy paste all the times just create one client script and change the catalog item and do insert and stay  



post me your feedback


Please Hit ✅Correct, ��Helpful, or ��Like depending on the impact of the response


Have a lovely day ahead




Regards,


Divya Mishra


Hey Divya,


If I add all these variables in the variable set then is it possible to make them read only in service catalog form?


Hi Ishaan,



Sorry for late response...was a bit packed


Yes you can apply scripts on Variable sets. Go to variable sets in app nav open your variable set and do the scripting.



post me your feedback, as it boosts me up


Please Hit ✅Correct, ��Helpful, or ��Like depending on the impact of the response


Have a lovely day ahead




Regards,


Divya Mishra


Yes, you can apply at the variable set level, and add that variable set to multiple catalog items.

 

Regards

Manushree

Ashutosh Munot1
Kilo Patron
Kilo Patron

HI Ishaan,



Are this variables fixed or they will change as per catalog item's?



Thank you,
Ashutosh