Sharepoint 2010 and infopath - access workflow variables? -


i have workflow runs every time new list item added.

the list item comprises of 3 fields:

  1. a question,
  2. a person answer question,
  3. an answer.

the first 2 fields supplied user creates list item, , workflow routes item expert supplies #3, answer.

on answer form, question field populated question, can't drag question field onto form without creating repeating section, when should creating textbox? says type group rather string?

i'd know how workflow variables infopath forms.

any ideas on how i'd go creating simple q&a collection workflow appreciated.

the tl;dr part workflow needs :

  1. ask question , specify named user
  2. route user via workflow
  3. get answer user

and that's it.

your first issue caused fact question node repeating node in xml schema (see data, show fields, double click node , see repeating check box ticked). suspect wanted repeating group question , answer nodes. drag group onto form. might easier hard code schema specific number of questions it'll save bit of jiggery pokery getting question text loaded in you'll see below.

the second part little more involved , there few explainations on web on how it. have 2 books , neither great @ explaining this! firstly need create secondary datasource in form , link itemmetadata.xml file contains

<z:row xmlns:z="#rowsetschema" ows_question1="" /> <z:row xmlns:z="#rowsetschema" ows_question2="" />

etc. - note no root node exaclty shown.

then in workflow can set value form in secondary datasource @ runtime using like:

myfirsttasktaskproperties.extendedproperties["question1"] = "the text of question 1";

in infopath form should set default value of main datasource question field node in secondary datasource. when thing runs work.

i hope reasonably familiar sharepoint workflows there quite few other things need infopath form working in workflow. in experience it's quite painful getting working. luck friend.


Comments