GlideForm field types (scripted, UIB)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
A more complete field example:
firstName: {} 19 keys
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Interesting challenge. Based on what you are sharing, it looks like you are trying to map a non-input display element using the same field schema structure that UIB uses for input fields.
For a label or annotation type display element, try using the "annotation" type from the internal types you listed. Here is an example structure you can pass:
{
name: "myLabel",
label: "This is a label",
visible: true,
readonly: true,
mandatory: false,
canWrite: false,
canRead: true,
canCreate: false,
value: "Your label text here",
displayValue: "Your label text here",
type: "string",
internalType: "annotation"
}The key here is setting internalType to "annotation" while keeping type as "string". The annotation internalType tells the UIB renderer to treat this as a display only element rather than an input field.
If annotation does not render as expected, also try "translated_text" or "translated_html" as the internalType, as these are designed for display only content in the GlideUIElement world.
A couple of questions that might help narrow it down further:
- Are you building this inside a UIB custom component or using the out of the box form component?
- Are you passing this schema dynamically via a data resource or hardcoding it in the component properties?
That context would help pinpoint exactly where the rendering is falling short.
ServiceNow Developer & Admin
Builder of NowFixer | Free AI debugging tool for ServiceNow scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thanks for the response! When I try a new type I always changed type and internalType at the same time. This time I did as you suggested, but it displayed like a read-only string field rather than an annotation. When I change both, it displays an empty annotation, implying that I may be missing a property.
I'm wrapping the baseline form component
Dynamically.
Also, speaking from experience, LLMs really don't know what they're doing when it comes to highly technical or niche ServiceNow concepts. Your own guesses are likely to be more helpful here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thanks for the feedback, that is fair and appreciated. You are right that this is genuinely niche territory. That said, the fact that changing both type and internalType to annotation gives you an empty annotation is actually useful information. It suggests the renderer recognises the type but is not finding the value it needs to display.
A few things worth trying based on that observation:
The annotation type in ServiceNow typically expects the display content in a specific property. Try adding a "text" property alongside value and displayValue:
{
name: "myAnnotation",
label: "My Label",
visible: true,
readonly: true,
mandatory: false,
canWrite: false,
canRead: true,
canCreate: false,
value: "Your annotation text here",
displayValue: "Your annotation text here",
text: "Your annotation text here",
type: "annotation",
internalType: "annotation"
}Also worth checking whether the baseline form component you are wrapping expects a "fieldType" or "uiType" property in addition to type and internalType. Some UIB components have their own property layer on top of the GlideUIElement schema.
If none of these work, the most reliable path might be inspecting the network payload of a native form that already renders an annotation field and comparing the exact property structure it receives. That would give you the ground truth rather than guesswork.
ServiceNow Developer & Admin
Builder of NowFixer | Free AI debugging tool for ServiceNow scripts
