Hi @Anonymous ,
If you are working with a large dataset, using the 'LookUp' function with conditions on multiple columns might not be the most efficient way, especially if the dataset is large. Here are a couple of alternatives that you can consider:
1. Use the 'Filter' function along with 'First' to get the first matching record:
First(
Filter(
EmployeeList,
StartsWith(Text(Number), 'search employeeNo'.Text) &&
StartsWith(Text(Code), 'search SecurityCode'.Text)
)
)
This approach uses 'Filter' to filter the records based on your conditions and 'First' to get the first matching record. It's often more efficient than 'LookUp' when dealing with large datasets.
2. Use the 'Search' function to search across multiple columns:
Filter(
EmployeeList,
Search('search employeeNo'.Text, Number) > -1 ||
Search('search SecurityCode'.Text, Code) > -1
)
This approach uses the 'Search' function, which allows you to search for a substring within a larger string. It can be useful for searching across multiple columns.
3. If your data source supports delegation (SharePoint, SQL, etc.), you can delegate the search operation to the data source:
Filter(
EmployeeList,
StartsWith(Text(Number), 'search employeeNo'.Text) &&
StartsWith(Text(Code), 'search SecurityCode'.Text)
)
Make sure your data source supports delegation for the specific operations you are performing. Delegation is crucial for the efficient handling of large datasets. Choose the method that works best for your specific scenario and data source. Experiment with them and see which one provides the best performance for your use case.
Thanks!!!
Please consider marking my response as the accepted solution if it successfully resolves your concern. If you found the information beneficial in other aspects, kindly express your appreciation by giving it a thumbs-up.