Type field in sys_ui_element table?

Anil20
Tera Contributor

What is the use of type field in sys_ui_element table?

Can anyone please help?

10 REPLIES 10

Anil20
Tera Contributor
Let's say for a field X of my table it is set as component. and i am facing issues with the field. I am not able to edit that. And for the same field in other instance the type is formatter. Is that because of the type I am facing the issue?

It would be mush easier if you post examples, which you have. In case of type=component the content of element field should be something like com.glideapp.questionset.DefaultQuestionEditor. If your problem is only the problem of changing sys_ui_element then you can do that by exporting data to XML, editing the XML data in text editor and importing XML data back. It should work. Alternatively you can write small script, which use GlideRecord to find the record in sys_ui_element table by sys_id (using get method), set new value for type and call update method.

Anil20
Tera Contributor
Sorry but i guess you can't understand my point. Suppose I have a module let's say change module which is working without any issue. And when I add some questions to it some fields are getting freezed. I suspect because of the questions the abnormal behaviour is happening. When I checked this field in sys_ui_element table it is set as component and for other instance where it is working fine it is set as formatter. That's why I am wondering if the type is causing the issue.

Sorry, but I really can't follow you. Your original question was short and clear "What is the use of type field in sys_ui_element table?". Now we discuss something which is far from that.

Records in sys_ui_element will be referenced in Views of some table (in list view or form vie, but in your context it seems be form views). If you write about "instances" I suppose that you mean ServiceNow-Instances (like dev and prod instances). If you have some differences on opening some form, then you should verify which is current view, which you use. The last used View name can be save (per instance) and be used later. The second reason could be that you really have different view on different instances. It's not a problem in general, but you can delete a view or transfer a view, which you like from one instance to another (via Update Set for example and "Add to Update Set" UI Action - see here).

Anil20
Tera Contributor
Thanks for your quick help. But actual issue is what i posted in the above reply? And for that issue i need to understand the actual significance of type field. Once again thanks for elaborating the significance.