112
Views
5
Comments
Solved
how to design this table in the UI?

hi everyone,

I'd like to ask

how to design this table in the display page?

I've tried using the table widget but it hasn't worked.

Thanks,

2021-11-12 04-59-31
Manikandan Sambasivam
Solution

To design a complex table layout like the one you've shown in Outsystems, using a table widget alone might not suffice due to the multi-row and multi-column spanning requirements. Instead, you can use a combination of containers and columns to achieve the desired structure. 

  1. Create a New Web Block or Web Screen:

    • Start by creating a new web block or web screen in your Outsystems application.
  2. Add Containers for the Structure:

    • Use containers to create the main sections of the table (Title, Analysis, Component, etc.).
  3. Use Nested Containers for Rows and Columns:

    • Nest containers within each other to represent rows and columns. This gives you the flexibility to span rows and columns as needed.
  4. Set CSS Classes for Styling:

    • Apply custom CSS classes to these containers to control the borders, padding, and alignment.

Sample CSS

.table-title {    display: flex;    justify-content: space-between; } .title {    font-size: 24px;    font-weight: bold; } .type-period {    display: flex;    justify-content: space-between;    width: 200px; } .type, .period {    padding: 5px;    border: 1px solid black; } .table-container {    width: 100%;    border-collapse: collapse; } .row {    display: flex; } .cell {    padding: 5px;    border: 1px solid black; } .analysis-header, .component-header, .period-header {    font-weight: bold;    text-align: center; } .footer {    margin-top: 20px; } .footer-text {    text-align: center;    font-size: 14px; } 

2024-04-26 12-21-07
Anjali_Dange
Solution

Yes, you can insert data into table using expressions. You need to insert the expression into the HTML Code input to Inject HTML. 

Please find attached oml which has both inject html and expression used for creating this table.

Let me know if it helps.


Regards,

Anjali D.

TableDemo.oml
2021-11-12 04-59-31
Manikandan Sambasivam
Solution

To design a complex table layout like the one you've shown in Outsystems, using a table widget alone might not suffice due to the multi-row and multi-column spanning requirements. Instead, you can use a combination of containers and columns to achieve the desired structure. 

  1. Create a New Web Block or Web Screen:

    • Start by creating a new web block or web screen in your Outsystems application.
  2. Add Containers for the Structure:

    • Use containers to create the main sections of the table (Title, Analysis, Component, etc.).
  3. Use Nested Containers for Rows and Columns:

    • Nest containers within each other to represent rows and columns. This gives you the flexibility to span rows and columns as needed.
  4. Set CSS Classes for Styling:

    • Apply custom CSS classes to these containers to control the borders, padding, and alignment.

Sample CSS

.table-title {    display: flex;    justify-content: space-between; } .title {    font-size: 24px;    font-weight: bold; } .type-period {    display: flex;    justify-content: space-between;    width: 200px; } .type, .period {    padding: 5px;    border: 1px solid black; } .table-container {    width: 100%;    border-collapse: collapse; } .row {    display: flex; } .cell {    padding: 5px;    border: 1px solid black; } .analysis-header, .component-header, .period-header {    font-weight: bold;    text-align: center; } .footer {    margin-top: 20px; } .footer-text {    text-align: center;    font-size: 14px; } 

2024-04-26 12-21-07
Anjali_Dange

Hi Sherly,

If number of rows and columns of this table are fixed. You can create this table in HTML and add the HTML code using InjectHTML block which can contain table values as expression.

Links for refernce:

https://wordhtml.com/

https://www.outsystems.com/forge/component-overview/7239/injecthtml-o11


Regards,

Anjali D.

UserImage.jpg
Sherly S

@Anjali_Dange

Hi Anjali, if you use Inject HTML, how do you insert data into the table?

2024-04-26 12-21-07
Anjali_Dange
Solution

Yes, you can insert data into table using expressions. You need to insert the expression into the HTML Code input to Inject HTML. 

Please find attached oml which has both inject html and expression used for creating this table.

Let me know if it helps.


Regards,

Anjali D.

TableDemo.oml
UserImage.jpg
Sherly S

I have tried to create an HTML script, but when I run it the table is not reactive, instead the table extends to the right.  When I tested it in HTML, this script was safe and appropriate, but when it was input into Outsystems it looked strange.  How do I make sure that when input into Outsystems, the display matches what is in the HTML?

I have attached the html script

tabel-2.txt
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.