56
Views
3
Comments
Generating dynamic table

Is there a way where I can allow users to specify the number of rows and columns that they want and generate a table of that size?
They should be able to input number of rows and number of columns (can select from dropbox or enter a value).


2025-10-18 11-13-53
Ramesh subramanian
UserImage.jpg
Jia Le Chang

thank you for the fast reply. 
I will look into these solutions.

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

Yes, you can allow users to specify the number of rows and columns they want and generate a table of that size in OutSystems. 

1. Create the User Interface

Create a screen where users can input the number of rows and columns.

  1. Input Fields for Rows and Columns:

    • Use two input widgets or dropdowns for the number of rows and columns.
  2. Button to Generate Table:

    • Add a button that will trigger the action to generate the table.

2. Define Variables

Define variables to store the number of rows and columns.

  1. Local Variables:
    • NumberOfRows (Integer)
    • NumberOfColumns (Integer)
    • TableData (List of List of Text)

3. Create a Client Action to Generate the Table

Create a client action that generates the table based on the input values.

  1. Client Action: GenerateTable

4. Display the Table

Create a table in your UI to display the generated data.

  1. Table Widget:

    • Use a Table Records widget or a List Records widget inside a container.
  2. Binding Data:

    • Bind the TableData to the table widget.
  3. Dynamic Columns:

    • Use a nested For Each loop in the table to dynamically generate the cells based on the TableData.
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.