OldCodger Posted August 23, 2013 Author Share Posted August 23, 2013 Ok.. Thanks again FF for the code. I have made some enhancements(whether they are coded correctly or optimally is another thing). Created addition preview/output columns Added output file name input requirement Allowed multiple search criteria Annotated the controls One of the requirements I'm having difficulty with is preventing duplicate rows from being input to the preview. I've tried all sorts of listview to array examples from the forums to achieve this but am getting nowhere. Basically, when the commit button is clicked there should be a check to see if a row in the Segments list view already exists in the Preview list view and if there is the commit is stopped and the user informed of the offending row so they can do something. After days of f'ing about with arrays I finally solved it with a simple function. Func _Dupes() Local $iSeg, $iPvw ;Get the segment 'buyer' value For $k = 0 To _GUICtrlListView_GetItemCount($hLwSegments) - 1 $iSeg = _GUICtrlListView_GetItemText($hLwSegments, $k, 2) ;Get the preview 'buyer' value For $m = 0 To _GUICtrlListView_GetItemCount($hLwPreview) - 1 $iPvw = _GUICtrlListView_GetItemText($hLwPreview, $m, 3) If $iPvw == $iSeg Then ConsoleWrite("Duplicate found = " & $iPvw & @CRLF) $cRetval = 1 EndIf Next Next Return $cRetval EndFunc ;==>_Dupes Link to comment Share on other sites More sharing options...
Solution FireFox Posted August 23, 2013 Solution Share Posted August 23, 2013 Glad you got it working OldCodger 1 Link to comment Share on other sites More sharing options...
OldCodger Posted August 23, 2013 Author Share Posted August 23, 2013 Someone could have told me though.. would have saved me days. Thanks for your help FF. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now