Rodney Posted June 23, 2017 Share Posted June 23, 2017 I wish to use the text field in a concatenated string field but I cannot work out how to access the table /array the field is held in is it possible to access these fields? Link to comment Share on other sites More sharing options...
AzeoTech Posted June 27, 2017 Share Posted June 27, 2017 I'm not quite sure what you are asking. The descriptive text table is not accessible from script. What are you trying to do? Link to comment Share on other sites More sharing options...
Rodney Posted June 27, 2017 Author Share Posted June 27, 2017 the descriptive text holds a 2 alpha character site id for 16 sites and I was hoping to use it for channels names example NB_Pressure_Reading CB_Pressure_Reading etc I was hoping to use the evaluate function to generate the Channel names Link to comment Share on other sites More sharing options...
Rodney Posted June 27, 2017 Author Share Posted June 27, 2017 Sorry I should of been more detailed I plan to have the user choose a site from a combo box then based on what site is chosen all the data from that site is displayed on the page Link to comment Share on other sites More sharing options...
Rodney Posted June 27, 2017 Author Share Posted June 27, 2017 I have decided to use a sequence with a switch statement to populate the site ID by trying to follow the Manual section 5.13 and section 5.10 re variables but I cannot get it to compile please see attached what have I done wrong? Link to comment Share on other sites More sharing options...
AzeoTech Posted June 28, 2017 Share Posted June 28, 2017 = is assign, where == is comparison. So, you really should never use = inside an if(), or even a while() loop or anywhere else where you are comparing two values. Also, I'd use a lookup table for this: global string sites sites[0] = "BB" sites[1] = "CB" // etc then you can just look it up using: sites[site_ID] and it will return the correct string provided the ID is valid. Link to comment Share on other sites More sharing options...
Rodney Posted June 28, 2017 Author Share Posted June 28, 2017 Thank you for your help I will attempt to use a lookup table - remembering I am not a programmer - just an Accountant.............. Link to comment Share on other sites More sharing options...
AzeoTech Posted June 28, 2017 Share Posted June 28, 2017 You don't have to use a lookup table. Do what's comfortable to you until performance becomes an issue. And most DAQFactory user's aren't programmers either, though many of them learn to program using DAQFactory and thus add a powerful tool to their toolkit. Link to comment Share on other sites More sharing options...
Rodney Posted June 28, 2017 Author Share Posted June 28, 2017 Thanks - great to know !!- I won't feel so silly now asking what I think are basic questions!! Link to comment Share on other sites More sharing options...
Rodney Posted July 4, 2017 Author Share Posted July 4, 2017 Lookup table works !! - again thanks for the help Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.