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

Discussion

Discussion

Workflow bug? Custom Query/Query Data activity with multiple fields

posted on August 24, 2022

Just want to possibly report a bug for Workflow 11.

 

Workflow version 11.0.2206.826

 

When using a "Query Data" or "Custom Query" activity in a workflow that has 2 or more fields with the same name, there is only one token generated with that name. The expected behavior is to either show multiple repeated tokens of the same name and/or (and possibly better?) report a warning.

 

Additionally of note is that it seems when you use the generated token that workflow will choose, it returns the second (or last) field value of the same name in the available data set.

 

Say you have something like "SELECT table1.name, table2.name FROM..." (or "SELECT * FROM" a view with those same columns). And the table1.name is "John" and the table2.name is "Paul", workflow gives you one token "name" that has a value of "Paul".

 

Has anyone confirmed behavior like this?

0 0
replied on August 24, 2022

Creating an alias is a clear workaround, thank you for that suggestion.

The difficulty is that many times we do not have access to the sql database. When we are only given a view to use, the returned tokens is all that is provided from the workflow interface when it comes to the fields in the view. There can be many hoops to jump through and departments to contact to gain the access needed to determine the issue is in the fields of the table. And acquiring that access can be unnecessary if that is not the root of the specific issue we are dealing with.

Providing all the columns (including duplicates) as tokens that can be reviewed in with the Track Tokens activity would not only save time and be helpful when diagnosing issues, it is the expected behavior.

0 0
replied on August 24, 2022

We're a bit at the mercy of the ODBC driver there. But we can look into whether there's any way to tell we got more than one column with the same name.

1 0
replied on August 25, 2022

Regarding the ODBC driver, does it help or make a difference if we configure the data source as a Direct Connection with Data Source Type = Direct, and Data Source Driver = Sql?

0 0
replied on August 25, 2022

As opposed to using Windows ODBC data sources? It's possible that you use a different version of the driver that way (assuming you have multiple versions installed on the machine), but unless you know they made changes that would result in aliasing duplicate name columns, that's unlikely.

I would expect this would be a low priority bug for driver manufacturers as well because of how unlikely it is to have duplicate column names in a view.

0 0
replied on August 25, 2022

You mentioned you are at the mercy of the ODBC driver, so I was just curious if the direct route has the same difficulty. We tested both ways and got the same result, so at the time I thought the workflow interface was the culprit for condensing the column/field list but it makes sense that it could be either or both of the drivers.

Thanks for looking into this and I'm looking forward to knowing if you do find a way to tell if more than one column with the same name is returned (or if you can confirm the drivers are the issue).

0 0
replied on August 24, 2022 Show version history

I guess you could call it a bug, but Workflow won't make up names for your duplicate columns. Use aliases in your custom query or view definition to distinguish between the two and they'll be reflected in the token names.

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

Sign in to reply to this post.