11-13-2017 06:14 AM
Hi
I have string as shown
PROGRAM = PASSED , XT ID = PASSED , VERSION = Abort , Temperature = Abort , IDLE Current = Abort , ON_Current = Abort , IMEI = Abort , SIM = Abort , GPS Ver = Abort , GPS C/N = Abort , Motion X = PASSED , Motion Y = PASSED , Motion Z = PASSED , vib Motor = Abort , LED = Abort , Tamper LGT = Abort , Tamper DRK = Abort , MIC_Tone_Frequency = Abort , MIC_Tone_Amplitude = Abort , Ambient = Abort , Transceiver(BER) = Abort , CHG_Current = PASSED , Hall = Abort , Speaker = Abort , LCD Backlight = PASSED , STimer = Abort
as you can see the string contain Test = result , Test2= result
what I want to do delete each test that contain abort I want to delete
example version= abort I want to delete also S TIMER= abort
thanks very mush
Solved! Go to Solution.
11-13-2017 06:22 AM
I would start by using Spreadsheet String To Array with the comma as the delimiter. This will give you an array of strings that should be Test = Result. Now you can use a FOR loop to iterate through each of your strings. Inside of the loop use Search/Split String to get just the result. If the result is "Abort", delete that element from the array (or just not add it to the output array). You can use Array To Spreadsheet String to get back to your string format.
11-13-2017 07:05 AM
Hi
I get to section that I need to delete from string , how I can do that if I am inside the for loop ,
thanks
11-13-2017 07:29 AM
I suceed to solve this
thanks
11-13-2017 08:11 AM
@Elyan_wisam wrote:
I suceed to solve this
thanks
Please share how so other people can learn
11-13-2017 09:00 AM
Re: Delete character from string - Discussion Forums - National Instruments
Hi
I have string as shown
PROGRAM = (1,1) , XT ID = (35612345,35612345) , VERSION = (V5.12.7.1,V5.12.7.1) , Temperature = (75,85) , IDLE Current = (0.03,0.06) , ON_Current = (0.04,0.08) , IMEI = (358683068194647,358683068194647) , SIM =(Abort,Abort) , GPS Ver = (GSD4e_4.1.2-P9_CCK F,GSD4e_4.1.2-P9_CCK F) , GPS C/N = (38,60) , Motion X = (50,360) , Motion Y = (50,360) , Motion Z = (50,360) , vib Motor = (1,1) , LED = (1,1) , Tamper LGT = (600,900) , Tamper DRK = (0,10) , MIC_Tone_Frequency = (3230,3260) , MIC_Tone_Amplitude = (3230,3260) , Ambient = (1,1) , Transceiver(BER) = (0,0) , CHG_Current = (0.3,0.6) , Hall =(Abort,Abort) , Speaker = (1,1) , LCD Backlight = (1,1) , STimer = (1,1)
as you can see the string contain Test1 = (min limit,max Limit) , Test2= (min limit,max Limit)
what I want to do delete each test that contain (Abort,Abort)
example Hall =(Abort,Abort) I want to delete
thanks very mush
11-13-2017 09:35 AM
Hi elyam,
so you got a solution on how to filter parts of your string - but you cannot use the very same algorithm for your changed input string?
And even worse: you need to create a new thread for the very same problem?
Side note: it's a VERY BAD idea to use the very same delimiter to separate items and values inside those items!