Skip to main content


 

Symptoms


After adding multiple entries into a list view on a form, the Save button is clicked to write the added/edited information to an external SQL DB. Attempting to then pass the values from these controls into data fields for a workflow, which are then pulled into an email event to send the list data, yields no results. The emails are empty, specifically they do not contain the values from the list view controls.
 

Diagnoses


Controls from a list view will not pass any data into a data field when instantiating a workflow from a form rule. Utilizing the SmartObject built on the SQL DB is the most straight forward way to access this data.
 

Resolution

Added a new column to the SQL DB titled "listID" and refreshed the service instance object. This creates a parameter to store a submission ID for multiple items for each form submission. Because of the specific architecture of this build, no SharePoint list items were being saved, so using the common list item ID value did not work here. As an alternate option, a timestamp, as well as the FQN of the user who submitted the form, are passed into the SQL DB on save to serve as a unique ID for filtering purposes when leveraging the data.

Next, the SmartObject was modified to allow use in a workflow. Once this is done, the SmartObject will show up in the Context Browser under the "SmartObject" node, and the method "Get List" can be called for the specific data that needs to be displayed, filtering on the unique identifier configured above (in this case a timestamp/FQN combination, but a list ID value can also be used). Making this call will output a list of all of the data, which will then have to be parsed/formatted using inline functions for a friendly display. Starting with a "Join(Values, Separator)" will add a delimiter of the developer's choosing, making it easier to parse/format the data.




 
Be the first to reply!

Reply