I have requirement to add view dynamically based on condition. is it possible to add sub view repeatedly using rule in smart form.
I have line items in Parent view, each line item has a checklist as subview. instead of having each line item specific subview, need to display one view with all the list of subview.
if i have one record in Parent view, need to display one subview, if it is 2 then two subviews and so on.
Parent view will not have fixed rows.
please let me know, if any body has solution and the same issue.
Solved! Go to Solution.
I have played around with this a little and believe that I have found a way to do this. Please see the steps below for what I did. Depending on your scenario, you may need to alter things a bit.
1) Create an unbound rule. In this rule, add the "Open a subview and execute a method" action. Select the view you would like to use and the Load method (configure the load method to use the ID value from the SmartObject assocaited with the list view).
2) Create another rule that will be used dynamically open the subviews. In my example, I created a rule to open the subviews after a button click but you can configure the event as needed.
3) In this new rule, click the conditions tab and add "For each item in a List View." Select the "Selected" state for the condition and then add a "Execute another rule" action to this rule and call the unbound rule that was created.
I have attached a few screenshots to help illustrate how I configured these but once you set this up you should notice that a subview appears for each item that was selected in the list view.
my requirement, I need to open all subviews as a single form/view during button click. below solution will help if need to manipulate one subview once at a time.
I have managed creating iframes using jquery and its working as expected. based on parent list view count, created iframd and passing subview url.
attached is the script.