Modify Display Height of Read Only HTML Variable on Catalog Item

Shawn Dowler
Tera Guru

What is the recommended way to modify the height of the box of a read-only HTML variable on the Catalog Item form? I would like to avoid having to create tons of UI Macros just to add a single line of rich text in the middle of forms.

33 REPLIES 33

Thanks for getting back to me. I wanted to make sure I was doing it right before sharing with the world.



I was trying to mimic the baseline read ACL for sys_user_role:



if(current.name == 'admin' && !gs.hasRole('admin'))


  answer = false;


else if ((current.name == 'maint' || current.name == "nobody") && !gs.hasRole('maint'))


      answer = false;


else


      answer = true;



But for our current implementation it wouldn't be necessary, since only admins can add roles. I think the concern is that some roles can add roles to other users, and a user with that role would be able to add the admin role to themselves and other users.


Am I missing something.   How does an ACL on the sys_user_role allow you to change the size of an HTML variable that is read only?


Am I missing something.   How does an ACL on the sys_user_role allow you to change the size of an HTML variable that is read only?

It doesn't allow you to change it to an arbitrary height, but it does keep the height: 300px from being added to the element's stype attribute, which means it stops ServiceNow from adding space below the read only HTML element. This is obviously a workaround. I don't know why the 300px are added otherwise and I don't know why this stops that from happening.



Maybe if you describe your use case someone could help you resolve your issue.


I have a very large table that i'm displaying in an HTML box when a certain item is selected from the drop down.   I would actually like to make the read only html box larger so that it does not have a scroll bar.