Extra column returned by ExecuteSqlCommand

LabKey Support Forum (Inactive)
Extra column returned by ExecuteSqlCommand Andy Straw  2014-06-09 13:09
Status: Closed
 
I'm using the LabKey Java ClientAPI - in particular, the ExecuteSqlCommand. I'm doing a SELECT on the flow.FCSAnalyses table, and I'm finding that I get one extra column back that I did not ask for: I asked for "RowId", but I also get back "_labkeyurl_RowId" which appears to be the URL I could use to view that row.

Why do I get back a column I didn't ask for? Is this a feature, or a bug?

This isn't a huge problem, but in my case, the columns to SELECT in the SQL are dynamically generated, so my processing of the columns returned is also dynamic, and this unexpected column has to be explicitly ignored by my code.

Thanks.

Andy Straw
University of Rochester
 
 
jeckels responded:  2014-06-09 13:15
Hi Andy,

This is intentional behavior. As you guessed, it is indeed the URL that is the link for the corresponding "real" column in the results.

You might consider setting the requiredVersion config property to 9.1 or 13.2. This returns a JavaScript object with a separate field for the URL (and other metadata), instead of a simple value for each column. This is the preferred response format, but for backwards compatibility we've had to keep the default response format consistent with its original shape.

Thanks,
Josh