How to retreive values from existing datatable
I am currently developing a workflow in which I used the SQLQuery activity.
Thus a datatable is returned.
I would like to be able to read the datatable to retrieve values.
Do you know how I could be able to do this?
I also attempted to use the solution in this thread but no luck:
https://support.geocortex.com/essentialsGSCForum?sub-nav=forum&main-nav=essentials&#!/feedtype=SINGLE_QUESTION_SEARCH_RESULT&id=90660000000XZnKAAW
I currently have no errors.
Here is part of my workflow:

0
-
Hi Shaniqua,
?A quick way to see the values in the data table may be to convert the data table to a featureset ("DataTable to Featureset" activity) and then create an alert using featureset.tojson. This will give you all the contents of the data table (via featureset) in json format.
Or you could export the data table to an excel sheet.
When working with individual data row items, in the For Each image above, to get to the value of, for instance, your OBJECTID, within the For Each it would be :
row.item("OBJECTID")
DataTables are a Microsoft .net framework and there is more information here on the syntax for data tables:
https://docs.microsoft.com/en-us/dotnet/api/system.data.datatable?view=netframework-4.7.2
I hope this helps,
Marion.0 -
datatable.Rows(0)(0).ToString is what I was looking for 0
Please sign in to leave a comment.
Comments
2 comments