How to get column datatype from glideElement?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2012 03:46 AM
In a script include I want to get the column datatype.
var gr = new GlideRecord('cmdb_ci_solaris_server');
gr.setLimit(20);
gr.query();
if (gr.next())
{
var ele = gr.getElement('name');
}
from the above code I get the glideElement. Is there any method which will return the datatype (Internal_Type) of the column?
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2016 01:18 AM
This is how you can get a column's internal type:
var type = gr.getElement('name').getED().getInternalType();
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/