You are viewing limited content. For full access, please sign in.

Question

Question

workflow script to process Query results

asked on April 8, 2019 Show version history

I am looking for a way in a Workflow Script activity to retrieve and process query results without first doing a For Each Row activity to load another multi value token.  What would be the token syntax to retrieve all values in a column token or value at an index of a column token?

            Dim sQueryCount As String
            Dim iQueryCount As Integer
            Dim oCurrentValue As Object
            Try
                Dim QueryColumn as Object = GetTokenValue("QueryData_Column1") 'needs syntax to get all
                Dim ValueList As List(Of Object) = New List(Of Object)
                sQueryCount = GetTokenValue("QueryData_Result Count")
                If Integer.TryParse(sQueryCount, iQueryCount) Then
                    For iIndex As Integer = 1 to iQueryCount
                        oCurrentValue = GetTokenValue("QueryData_Column1") ' needs to be indexed to iIndex
                        ValueList.Add(oCurrentValue)
                    Next
                End If
            Catch ex as Exception
                WorkflowApi.TrackError(rx.Message)
            End Try

 

0 0

Answer

SELECTED ANSWER
replied on April 8, 2019

Query results are not available as tokens outside of For Each Row.

1 0

Replies

replied on April 8, 2019

Not exactly what I was hoping for, but at least I know I must first fill multi value token(s) in a For Each Row loop to make the data available in my Script activity.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.