Hi friends,
I have some data in one .txt file and in another .txt file I have some more data.
The first text file has 5points and the 2nd text file also has 5points.
I need to check if the 1st point in the 1st text file is similar to any of the 5points in the 2nd text file.
Example
1st text file is named as BPL1
Draft at sight in the name of ABC and will be given to CDF
Manually signed
Full set signed
Packing list
Certification of original
2nd text file is named as BPL2
Full set signed
Manually signed
Certification of original
Packing list
Draft at sight in the name of ABC and will be given to CDF
So I need to check if 1st point that is Draft at sight is available in BPL2 and if available I need to write yes next to that point in BPL2.
I really don’t know how to do this. Can anyone help me
For Each activity (For Each item in linesTextFile1):
Assign activity:
isMatch = linesTextFile2.Any(Function(line) line.Trim().Equals(item.Trim(), StringComparison.OrdinalIgnoreCase))
isMatch = linesTextFile2.Any(Function(line) line.Trim().Equals(item.Trim(), StringComparison.OrdinalIgnoreCase))
The error is option strict on disallows late binding
arrayBPL1 (Array of String)= BPL1.Split(Environment.NewLine.ToArray(), StringSplitOptions.RemoveEmptyEntries)
arrayBPL2 (Array of String)= BPL2.Split(Environment.NewLine.ToArray(), StringSplitOptions.RemoveEmptyEntries)
Use For Each Activity (List of Items=arrayBPL2)
Use If activity in the for each
Condition: currentItem.Trim.Equals(arrayBPL1(0).Trim)
Then
4A. Use Invoke Method Activity for adding, and in the Parameters put like this currentItem+" Yes"
Else
4B. Use Invoke method for adding only
After the For each Use Assign activty and create a variable called FinalText