I have a list view to which I have added buttons using code from another discussion within the K2 forum. The user wants the button to display something different if the values in the List View have been transferred to a different table/view (hidden). However, the problem I am having is how to check the data in that table after it has been transferred for all records in the List View. It seems like it should be a For Loop, but I'm not getting that to work or make the connection to retrieve for each record the update date in the other table. Hope this make sense, any help is greatly appreciated. Thanks!
Hi Nealvarado
Based on the explanation given and what I understand from it I would suggest that you generate a list view (list view 2) from the mentioned SmartObject as well and then add both those list views onto a form. In the form you can then set the generated list views visiblity to invisible which will not allow the view to be displayed when the form is run but this will still allow you to populate the list view as neccessary which effectively allows you to do a condition check from form level against list view 2 and them make a change on list view 1 accordingly.
Steps to follow to achieve the above:
1) Create a new Form
* For explanation sake I will call it "Form".
2) Generate a list view from the mentioned SmarObject
* For explanation sake I will call this list view "Name List".
3) Edit the Name List and add another control to it, then set this controls visibility to false using the controls properties and also add some text to the Text property.
4) Edit the Form and add both the list views to it (this includes the list view which had just been generated in step 2 (Name List) and also the list view on which your buttons can be found.
* For explanation sake I will call this list view "Surname List")
5) In the Form add the following rule construction.
* When this rule construction is executed upon your button click from Name list, the GetList method will execute on the Surname List, the rule constuction will then continue to execute the for each rule which will check a condition to see a Surname in the Surname list contains the characters "TestSurname2". When this condition is found as true another rule will execute which will then set the control that you added in step 3 to visible.
After you have done the above you would have successfully presses a button on one list view which checked information form a different list view and then made a change on the list view from which the button had been pressed on based on the condition begin found as true or false.
Something to Know: You can set the Surname List to be invisible and disabled from Form level, this will affectively hide that view from the user but the checking condition will still work as expected.
Note: 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.
Kind Regards
Raymond
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.