Skip to main content
Resonate KT logo

Resonate KT Knowledge Base

Go Search
Home
  
Resonate KT Knowledge Base > WebReports Discussion > Setting Workflow multi-value Attributes  

WebReports Discussion

Modify settings and columns
Get help or share ideas and techniques for creating applications and reports with WebReports and WebReports Extenstions for Workflow.

To receive notifications when new posts are created, please choose the "Alert Me" option from the Actions menu below.  (Actions > Alert Me)
  
View: 
Post
Started: 1/27/2010 4:52 AM
Picture Placeholder: mpycroft
mpycroft
Setting Workflow multi-value Attributes
I have a multi-value text field as a workflow attribute.  The user enters some text in a form and the next step in the workflow is to use a web report to copy this information from the form into the workflow attribute.
 
This works fine when I use a simple text field.  However when I try to use a multi-value text field I am only able to update the first entry in the multi-value attribute.
 
Here is the code I am using:
 
[LL_REPTAG_&workid WFATTR:UserComments:COUNT  SETVAR:myCounter /]
[LL_REPTAG_"1" ADDVAR:myCounter  /]
[LL_REPTAG_%myCounter CURRENTVAL /]
[LL_REPTAG_&workid WFFORM:"Comments Form Form":txt_singleline:DISPLAY SETWFATTR:myCounter:UserComments /]
 
I have tried using
SETWFATTR:3:UserComments
and
SETWFATTR:"3":UserComments
and
SETWFATTR:[LL_REPTAG_%myCounter CURRENTVAL /]:UserComments
 
to add the information to the third element of the mutli-value variable but with no joy it always updates the first, any suggestions?
 
Thanks

 
Posted: 2/5/2010 9:12 AM
Picture Placeholder: jgladstone
jgladstone
The subtag syntax to set a multi-value workflow attribute should look something like this:
 
SETWFATTR:MV:<FieldNameInAttribute>
 
This will set the value of the first multivalue index to whatever is supplied in the main part of the tag.  To set the next index of the multivalue field, you add ++ to the tag:
 
SETWFATTR:MV++:<FieldNameInAttribute>
 
This will set the second multivalue index.  Each time you add this subtag to the reportview, it will increment the multivalue index number and write to that field.  If you wanted to skip the 2nd index but write to the third, you could do something like this:
 
[//Take the first value on the form and set it to the first value of the attribute:
 [LL_REPTAG_&workid WFFORM:"<formNAME>":MV:<fieldName>:1:DISPLAY SETWFATTR:MV:<AttrFieldName> /]<br>
 
[// Write a blank string to the second value of the attribute:
 [LL_REPTAG_"" SETWFATTR:MV++:<AttrFieldName> /]<br>
[//Take the third value on the form and set it to the third value of the attribute:
 [LL_REPTAG_&workid WFFORM:"<FormName>":MV:<fieldName>:3:DISPLAY SETWFATTR:MV++:<AttrFieldName> /]<br>
 
The first line in the above code will take the first value from the multivalue field on the workflow Form and write it to the first value in the multivalue field on the workflow Attribute.  The second line will write a blank string to the 2nd value in the multivalue field on the workflow attribute.  The third line will take the third value from the multivalue field of the workflow Form and write it to the 3rd value in the multivalue field on the Attribute.
 
Hopefully this is helpful, but if you need anything clarified please let me know.
 
Thanks,
Jordan
Posted: 2/9/2010 9:38 AM
Picture Placeholder: mpycroft
mpycroft
Thanks for the comments.  I understand what you are describing.  However what I would like to do is to have a multi value attribute and insert a value into any one of the index values.  Is this possible?  What I don't want to do is to have to read all the values to increment the MV value and then add the last value.
 
Any thoughts?
Posted: 2/9/2010 12:03 PM
Picture Placeholder: jgladstone
jgladstone
It's currently not possible to specify an index value to write to within the SETWFATTR tag.  The MV++ option will increment to the next index, but there's no way to jump directly to the nth index value.  I'll open a feature request to add this capability in a future WebReports release. 
 
If this is crucial to your project, please feel free to email support directly to discuss opening up a service agreement.
 
Thanks,
Jordan
Posted: 2/10/2010 3:44 AM
Picture Placeholder: mpycroft
mpycroft
It would be a good feature to see but I can work around it for now. 
Thanks for clarifying the situation I look forward to the feature appearing in a latter release.
 
Mike