Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
UI Macro/Formatter containing <table></table> breaks tabs on forms - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • UI Macro/Formatter containing <table></table> breaks tabs on forms
KB0564063

UI Macro/Formatter containing <table></table> breaks tabs on forms


3324 Views Last updated : Apr 7, 2024 public Copy Permalink
KB Summary by Now Assist

Description

When a UI Macro contains <table></table> and it is turned into a formatter, adding it to a form breaks the ability to toggle tabs for form sections. The issue occurs even if there is content between the table tags - just having them opened and then closed is enough to cause the behavior. Toggling tabs for the related lists still works correctly.

Steps to Reproduce

  1. Create a new UI Macro.
  2. Add <table></table> to the template. For example:
    <?xml version="1.0" encoding="utf-8" ?>
    <j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
    <table>
    </table>
    </j:jelly>
  3. Save and create a formatter out of this macro for the task table.
  4. Go to change_request.do and personalize the form.
  5. Add your formatter to the first section and save.
  6. After you are redirected back to the form, try to toggle tabs using the button on the upper right of the form.
  7. Try it on an existing change_request record as well. (Toggling tabs only works for the related list).
    This behavior can be seen other forms as well, like sc_req_item.

Moving the formatter around produces some different behavior. Consider a form with 4 sections:

[Formatter in Section 0]
Sections 1-3 are outside the first <form> element. Toggle tabs button will not work on the only section because tabs2.js sees there is only 1 section in the <form> element.

[Formatter in Section 1]
Same behavior as above, but Sections 0,1 are in the <form> element. Toggle tabs shows the same behavior because tabs2.js only sees 2 sections and tabs do not work for just 2 sections.

[Formatter in Section 2]
Tabs work for section 1,2 but Section 3 appears under the Section 2 tab.

[Formatter in Section 3]
Since it is the last section, toggle tabs performs as expected. This could be considered a workaround, but it imposes an arbitrary restriction on the customer and may not make sense depending on the contents of the formatter and which section is last.

Workaround

After carefully considering the severity and frequency of the issue and the risk of attempting a fix, ServiceNow has decided to not address this issue in any current or future releases.

While there are cases where tables display correctly when using <tr></tr> and <td></td> container tags, the most reliable workaround is to replace the use of tables in formatter macros with nested <div> tags and the appropriate CSS styling to control the layout.


Related Problem: PRB590079

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.