Skip to main content

Hell once again. Today I was building my workflow with infopath forms but I had few problems:

 1. In infopath form I don't want to use normal dropdown to end the task. I want to program my submit button to check few values on form and then make right outcome (for example when few textboxes are empty then outcome will be reject but when textboxes arent empty submit button will make apply outcome). The problem is that when I write my code in infopath, blackpoint give me error when submiting my form.

2. The second problem is that in infopath I set data source on sharepoint list with departments. Departments list is custom list with Titile (Department) and Department Director (user from sharepoint - at the moment it's string but I can change it to 'person or group'). In infopath is repeating section where I choose departments (dropdown list where display is Title of department and value is Department Director). The problem is I don't know how to assign task to many users (or single) from infopath (I don't know how to get users from infopath form). I have my form integrated with smartobject and I'm using infopath client event to get users from form (I set destination users to my repeating section) but it doesn't make any tasks (it doesn't matter if I set one or more users). Please help!

 Thanks

Y

About your questions:

1) When you say you are writing code, are you doing actual code behind in the InfoPath form. Using code in an IP form can present its own unique security challenges. I have done what you are suggesting before just by creating a series of rules with conditions. These rules could be fired as part of the main submit configuration and based on a condition such as textbox 1 having a value, they could set a field in the _K2 section of the main data source. If you go to Tools -> Submit Options you can gain access to the rules that have been configured for the main submit. Take a look at those rules and it will tell you which field you need to set in the _K2 part of the data source. The value you set that field too will need to match the actions you have defined for the InfoPath client event in your process.

 2) Keep in mind that when an InfoPath form is submitted to K2, the XML is updated within the process and those values are accessible from the Object Browser. If you created a repeating section that contains qualified AD user ids (domainuser), in the K2 process, you can edit a destination rule for when the wizard asks for user, navigate the Object Browser to the Datafields tab --> XML Datafields and locate the XML field for your infoPath form. In that schema, locate the repeating node that contains the multiple users and drag that into the destination rule wizard.

Hope this helps 


Thanks alot!

Reply