Parallel Comments - Viewing other comments on Parallel activity

  • 26 September 2011
  • 7 replies
  • 3 views

Badge +2
Hi I am new on K2 BlackPoint and I would like to ask your expertise on the following scenario:

We have a parallel approval for 3 users (user1, user2 and user3) using an infopath form.


1. Let us say User3 opened the task and put in his comments and approved the form.

2. I want the two remaining users to view the comments of user3 when they open the task..

3. Let’s say User2 approved the form and put in his comments..

4. I want User1 to view the comments of User2 and 3.


We have determined that this can be done using a list that is connected to the InfoPath form via SmartObjects. (query and submit).


I would like to ask your guidance on the steps on how to make the scenario above possible.

7 replies

Badge +10

Hi,


You are quite correct with the assumption about the List and SmartObject.


I would bind the Create and GetList methods of the SmartObject to the InfoPath form using the InfoPath Integration Wizard. This will enable you to use these connections in your InfoPath Form. In your list, ensure you have some sort of unique identifier which will be saved to the list so that you can retrieve only the comments relating to this approval.


On the Approval view, drop the return properties of the Getlist to the form. In your form load rules, set the unique identifier column property to the correct value so that only the comments for this instance will be returned. Then call the GetList method. When the form opens the comments will load and be displayed in the form.


To make an entry area, drag the input fields from the Create data connection onto the form so that a user can fill them in. In the Submit rules of the form, call the Create method before the K2 data connections are executed. This will create the new entry in the List and the comments will be saved. Ensure the approving user has create rights on the list for this to work.


Using this way your users should see all the comments and it should work as you explained.


Regards,

Badge +2

Hi JohanL,


I already used the Create method and it works! but I have a question about your statement "In your list, ensure you have some sort of unique identifier which will be saved to the list so that you can retrieve only the comments relating to this approval."  I do have a unique one which is a project title but I don't know how to update the list created. It keeps on creating another line in the list or duplicate entries. Is it doable in infopath? Can you give me instructions on how to remove the duplicate entries and just updating the uniqe identifier. By the way my list is composed only of a unique identifier which is a Project title and 9 comments. Here is  sample of my entries:


Project Title     Comment1   Comment2   Comment3


Marketing Test                                                                                   ----> Originator


Marketing Test   Approved                           Approved                  ----> (2nd View)User 1 is assigned to input on comment1 and 4. Submit.


Marketing Test                       Approved                                           ----> (2nd View)User 2 for Comment 2.Submit


Can it work for one line only? Should I use the update method of SmartObject? If so, how?


 


 

Badge +10

Hi,


I thought you were doing it differently, but yes it should be possible updating the comments in a single line. You will need to use the Update SmartObject method for your list.


After integrating the update method to your InfoPath form, look for the fields it provides in the Data Sources drop down. Drag the Input properties of the Update method onto the InfoPath form (You will probably only drag the relevant property to the relevant InfoPath view, eg. Comment1 on your first approval view, Comment2 on your second approval view, etc.) On the Form Load rules you can set the "Project Title" value of the Update method input property to the project title for the form. Then in your Submit rules, simply call the Update data connection. Since the Project title field was updated on form load it will have the ID to update and since the update method's comment field is on the form, the user completed it and it will automatically be passed to the Update method when you execute the Data Source connection.


I hope the above made sense. Let me know if you could get it working.


Regards,

Badge +2

Hi JohanL,


Will try this and post you feedback when I'm done, most probably next week. Thanks and Best regards.

Badge +2

Hi JohanL,


This is awesome! Thank you very much. For receiving the comments, is it possible to use only the receive data connection and not the GetList method of SmartObject? I've tried to create one text field which is my test to receive comments from the list. The only thing that I've configured is the Open/save rule which sets the field that I've created and the value is this --> comment from the list using receive data connection filter project title of the list equal to project title of the form(main text field) and comment from the list(receive data connection) is not blank. By the way, I'm using my example on top which has duplicate entries with. The results return in the text having no values at all or should I say there are no results just blank text field. If possible without using GetList method, would you mind giving me advice on this one? Thanks for keeping up with my newbie questions. 

Badge +10

Hi,


I'm not sure if I understood your question correctly. Please let me know where I misunderstood.


I suggested the GetList approach before knowing the structure of your data. You only need the GetList (or even a Load method) if you need to display the previous comments on your form. If you do not need to display the other comments then you do not need the GetList method in your InfoPath form.


For your example above you can use only the Update method and use the rules to take a normal (main data connection) field and set the value of the Update Data connection's comment field equal to this field before calling the Update Data Connection. This will accomplish the same. You only need a GetList or Load method if you need to load the previous comments.


If your values are not being saved, check your Submit rules. Remember to set the correct Comment field's value in your Update Data Connection before calling the actual data connection. This will ensure your changes are saved. Also ensure your conditions are met for the rule to fire.


I hope this helped!

Badge +2

Hi JohanL,


Great! Now I can get my list and be able to proceed in my project. Thanks for all of your instructions, it is such a big help to solve my problem from parallel comments. I'm able to view my comments on parallel basis. Thanks for keeping up with my questions!

Reply