取消
显示结果 
搜索替代 
您的意思是: 

Delete Empty String from Array

已解决!
转到解答

Hello All,

 

   I am using LabView 2020 to run an automated end of line test stand used in production. If the DUT passes, the program queries the serial numbers from a SQL database issued for that job, increments it by one and then saves the new serial number and the test results in a SQL database. If the DUT fails no serial number is incremented but it DOES save the failure test results in the same database.

 

  The problem I have is after a failure the serial number field in SQL is null. After the next part is tested, and the program queries the serial numbers for that job to increment the latest the null in the serial number field comes up as an empty string constant in the array. This causes the next serial number once a DUT passes to be set to 1; If there are multiple failures in a row an empty string constant shows up for each failure so the number of empty string constants varies. How can these be deleted programmatically?  

0 项奖励
1 条消息(共 3 条)
2,681 次查看
解答
接受人 Dennis_B.

Seems like a funny way to handle data, but this is how you can get rid of empty string constants from an array of strings:

capture.PNG

2 条消息(共 3 条)
2,663 次查看

Thank you Greg. I did not know that you could make indexing conditional like that.

0 项奖励
3 条消息(共 3 条)
2,596 次查看