I have a requirement in which the user enters any numerical value, let's say 4, so a grid should be created with four columns.Likewise, he can enter n values, so n columns should be created.
please let me know the implementation.
SAIL components can be dynamically generated within the scope of a loop - you can use a!forEach() here. So you can have one component that the User can use to choose how many columns a grid should have, and the gird can use that number entered/selected to dynamically generate the columns within the grid. But that's by far the easiest part of the implementation, what is going to be much more complex are how to ensure they don't select 1 million columns, or a negative number of columns; or how to 'type' the column (text, drop-down, integer, decimal); or (finally) how to map the content of the columns so that the data entered can be persisted to a database (assuming that's what you're intending).
Anyway, enough of the doom and gloom. Here's a snippet to get you going:
label: "Number of Columns",
placeholderLabel: "--- Select the Number of Columns required ---"
label: concat("Column ", fv!item)
hey, thanks, this is exactly what I needed.
Hi Stewart Burchell,
Is there any snippet for a!gridLayout()
I think based on my example you should be able to work out what to do, it's the same concept just different syntax. Give it a go and see how you get on.
Discussion posts and replies are publicly visible
© 2020 Appian. All rights reserved.