I am new in K2.
I have designed two list views. one for Header (Parent) and another for Details (Child).
Header view has a button.
i would like to achive
1. select one row of the Header view and on pressing the button, the Details view will open to display the details of the selcted parent.
2. Validations : Pressing button will display an error message if no row is selected or more than one row is selected.
Thanks with Regards,
Solved! Go to Solution.
I was not able to find any Rule / Condition for your scenario, but what you can try is the following:
1. Disable the Button on the Header view, and then have a Rule that enables the Button when the Header List ececutes the "List Item Click" Event, this should prevent users from selectin the button without selecting anything in the list.
2. On the Header ListView, click on the ViewSettings and disable the "Multiple Row Selecting" in the Runtime Options page
Based on the request in this post I can see that you plan on opening the relevant details (child) data for the selected parent item. For a basic solution I would recommend providing the Child SmartObject with a column dedicated to the Parent. This will allow the child to identify which content to display based on the selection made in the parent window. For this you would need to also make use the "open a subview and execute a method" rule which will do the relevant filtering in order to return the correct results. Please see the below step by step on how to get this setup.
Step by Step | Based on you scenario, you can start following the steps from step 2:
1) Create a SmartObject called Parent, provide it with the following properties and data types:
2) Create another SmartObject called Child, Provide it with the following properties and data types:
3) Generate or create an Editable List View for each of the created SmartObjects.
4) Run the parent Editable list view and add some data.
5) Run the child Editable list view and add some data. Note on the Parent ID, you will need to provide the ID of the record in the Parent which will allow the Parent ID column to be used as a foreign key allowing you to have value to return specific records with.
6) Edit the Parent Editable list view, hide all the unrequired buttons and do the following:
7) Now add another rule "When parent view executes list item click" and do the following:
😎 Save, Finish, Run the Parent, select a record in the parent list - You will see the Child popup and display the data only relevant to that specifically selected parent record.
Should you feel that this post is of use and or an accurate solution to the raised question, I kindly encourage you to mark it as such using the 'Mark as Solution', 'Kudo' andor ‘Me Too’ options.