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.

tablename.fieldname not compiling


stormwaterms Mar 29, 2012 06:57 AM

Hello,

Tablename.fieldname produces a "could not find Tablename.fieldname(1)" error upon compile. The table and field are defined and function as they should. This seems like one of those cases where I'm missing something obvious but I'm pulling my hair out.

Some context in case there's a better way to do it, I'm trying to calculate a delta based upon the difference between the current value and the previously recorded value.

Thanks for your help,

Scott


jra Mar 29, 2012 12:48 PM

Scott,

Are you using the actual TableName and fieldname from your DataTable (Test,1,1000) instruction? In this case the TableName would be Test. Fieldnames are derived from the specific variable name and output instruction. In this case: Minimum (1,batt_volt,FP2,0,False) the fieldname would be batt_volt_min. You can see the fieldnames for your tables in CRBasic by selecting Tools | Show Labels.

If that doesn't help then post your program or the pertinent parts of your program here.


stormwaterms Mar 30, 2012 07:31 PM

Janet,

Thank you for such a quick response. In the end I did not understand how to use the "_Prc" component of the syntax--that "_Prc" had to match the data process associated with the variable I was trying to call up. I believe that I have it figured out now.


canineaussie Feb 27, 2013 07:37 PM

This was my issue as well. I was averaging the variable in my data table, so "_avg" was required at the end of the variable name in the instruction. Mike Adams responded and the help file is being amended. Thanks for the solution, Campbellsci!


Sam Feb 28, 2013 01:29 AM

Don't forget to use the handy "show labels" tool in CRBasic Editor menu bar.
Save and compile first.
There you will see the names of all the fields in the public and user defined tables.
It takes the guesswork out of the whole process.

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