Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
5 replies
Subscribers
7 subscribers
Views
1754 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hello, My Question is related to dynamic section creation. I have my
tapans
over 7 years ago
Hello,
My Question is related to dynamic section creation. I have my sections created based on user enters the data. So let say for One department if client has entered data for 5 sections, I want to display them just like 3 sections in firstcolumncontent and rest 2 in secondcolumncontent. So the section creation is totally dynamic and based on data entered by users.
While saving the data into database, I am also saving sectionorder (like 1,2,3..), now how I can write a code so I can have my sections distributed in first and secondcolumncontent?
Just a thought : totalcount(all sections)/2, if result is 0 data can be distributed to both columns and if result is odd, the other way around, but I am not sure how I can do that.
Any help/hint regarding this would be appreciated.
Attached mockup screenshot of sections entered by user.
Thanks!
OriginalPostID-211061
OriginalPostID-211061
Discussion posts and replies are publicly visible
0
sagarl511
A Score Level 2
over 7 years ago
What are the different SAIL components you are planning to display? Are they all text or simple components? As it also depends on type of components and amount data you want to display. for e.g. paging grid will require more amount of screen space,etc. You might be able to use mod(numberofsections,2) and enumerate() function to get the section numbers to be displayed in columns. Logic will completely depend on metrics you choose to display the data.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Conor Cahill
Certified Lead Developer
over 7 years ago
You could do something like using a!applyComponents() on both first and second column, passing in the full list of data to the rule and looping over an index variable.
Then in the first column only do something when the index is odd. In the second column only do something when the index is even.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
tapans
over 7 years ago
Hello Sagar and Conor,
we are planning to display normal text, hyperlinks and documents. I will try the suggestions and let you know how it goes.
Thanks for your feedback.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
tapans
over 7 years ago
Hello Guys,
Can you give me some sample code for reference? I am using gridlayout for different sections. Would be more clear if I can get some sample code to use index with mod() function for looping. Thanks.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
tapans
over 7 years ago
So I am able to manage somehow displaying my grids in first and second column contents. But it is coming in zigzag way. See attached screenshot. I have also attached my code. Any thoughts on how to make proper formatting?
Forum 1.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel