Valnurat Posted February 5, 2016 Posted February 5, 2016 Hi. How is it possible to retrieve data from an array by searching in the array? I want to retrieve data from col0 by searching in col1. Func _MisPlacedAD_Accounts() _ArrayDisplay($aAllBackupDestination,"AllBackupDestination") _ArrayDisplay($aMisPlacedAD_Accounts,"Before delete") _ArrayDisplay($aUsersTarget,"UsersTarget") Local $aListOfFolders, $sIndex for $y = 0 to UBound($aAllBackupDestination) -1 $aListOfFolders = _FileListToArray($aAllBackupDestination[$y][0],Default,2,False) for $z = UBound($aMisPlacedAD_Accounts) -1 to 0 Step -1 If _ArrayFindAll($aListOfFolders,$aMisPlacedAD_Accounts[$z]) <> -1 Then $sIndex = _ArrayFindAll($aUsersTarget,$aMisPlacedAD_Accounts[$z],Default,Default,Default,Default,3) ;_ArrayDisplay($aMisPlacedAD_Accounts,"Before delete") MsgBox($MB_SYSTEMMODAL, $aMisPlacedAD_Accounts[$z], UBound($sIndex)) _ArrayDelete($aMisPlacedAD_Accounts,$z) ;_ArrayDisplay($aMisPlacedAD_Accounts,"After delete") EndIf Next Next _ArrayDisplay($aMisPlacedAD_Accounts,"After delete") EndFunc In this case $sIndex is allways 1. Yours sincerely Kenneth.
Valnurat Posted February 5, 2016 Author Posted February 5, 2016 I solved it. Admin please delete this post. My mistake. Yours sincerely Kenneth.
water Posted February 5, 2016 Posted February 5, 2016 Questions and answers never get deleted. It would be great if you could post your solution so it can be useful for other users in the future My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
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