I hope you can help as I am stuck. I have an SQL database that I want to search and return rows, based on the selection of a separate collection. The difficulty I cannot figure out is that the collection has two columns, one of which shows the column in the sql database and the second is the unique number in that column that can pull the specific rows.
SelectedTrackingCodes (The collection)
| TrackingCodeType | TrackingCodeNb |
| GP | 123456 |
| CDT | 654321 |
| IT | 123789 |
AllData (On Prem SQL)
| Gp | Cdt | It | |
| 123456 | | | |
| | 654321 | | |
| | | 123789 | |
I have tried this
ClearCollect(SelectedData,LookUp(SelectedTrackingCodes, TrackingCodeType = "GP", Filter(AllData,Gp=TrackingCodeNb))); and multiple other versions with filter, but cannot figure out how to pull the row or rows for Gp 123456 using the collection as a reference for both the column lookup. Then it should pull Cdt 654321 and its row or rows of data, and so on until all the items in the collection have been pulled into the new collection.
I have tried to look for the answer myself through the community, but nothing seems to fit the requirement I have to select the column first.
Any help would be greatly appreciated.