How to add new field to table but not to default form view

whitewalker
Kilo Contributor

I have created a UI Page that add fields to specific table, but I don't want to add this fields to table default view.

Found this in wiki: "When you create a field from the system dictionary, it is automatically added at the end of the first section of the default form view."

Also i don't want to set specific form view for those table.

Any ideas ?

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Hi Nick,



You would have to remove it from the form after it has been created. There may be a property to disable this, but doing so would be a real pain to developers in the future because every field would need to be manually added.



The forms are constructed from the following tables, sys_ui_element, sys_ui_section, sys_ui_form, and sys_ui_view. You can kind of see how the pieces fit together (parent/child relationships) based on the names.



Can I ask what the use case is for adding a field via a UI page? Seems like a tough way to do something that's already built in to the system in several other places.


View solution in original post

14 REPLIES 14

bernyalvarado
Mega Sage

Hi Nick,



You will just need to play with the sys_ui_section and sys_ui_element tables to remove the field you just added.



Thanks,


Berny


Pardhu Guduru
Tera Guru

Hi Nick,



Please check the table 'sys_ui_element' . This tables holds the relation between the fields and the view or form.   Try to create a script include from which you can delete the entry of the newly created field into this table by this you can restrict the new field to visible from the form.


find_real_file.png


Chuck Tomasi
Tera Patron

Hi Nick,



You would have to remove it from the form after it has been created. There may be a property to disable this, but doing so would be a real pain to developers in the future because every field would need to be manually added.



The forms are constructed from the following tables, sys_ui_element, sys_ui_section, sys_ui_form, and sys_ui_view. You can kind of see how the pieces fit together (parent/child relationships) based on the names.



Can I ask what the use case is for adding a field via a UI page? Seems like a tough way to do something that's already built in to the system in several other places.


Chuck Tomasi wrote:




Can I ask what the use case is for adding a field via a UI page? Seems like a tough way to do something that's already built in to the system in several other places.


Lets say we have a form with a defined set of fields. One of these fields is a Choice. Depending on what value is selected in Choice field, form should display a set of additional fields. The list of additional fields is dynamic. I can't just create them and then hide or show when it's needed.