Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Programmatically Retrieve FieldNames from Specific Table


notcabbage Nov 19, 2021 01:37 AM

I have a need to retrieve every field name in a specific table using CRBasic. This is in preparation of sending an HTTP Post request to a Web API where none of the provided Campbell Scientific data formats will suffice. I can easily iterate through the records of the table using

recordstowrite = BufferTable.Record(1,1)
For i = 1 To recordstowrite
   GetRecord (Result,BufferTable,i)
   <Prepare Record>
Next i

 However, to use the FieldNames, I must either maually declare those as an array of strings instead of grabbing those from my BufferTable. Upon a successful API call I will reset the BufferTable to zero records.

Anyway to do this? Or a slicker way using NewFieldNames I'm not seeing?

Log in or register to post/reply in the forum.