Cannot get the results to returned back to my page code function from public .js file function.

@coz This line is wrong:

return wixData.query(dataBaseName,searchKey)

The .query() method only accepts a single parameter (i.e. collectionId).

Also if all the firstName values always start with a capital letter, you should make sure the search term is the same:

searchKey = searchKey.replace(searchKey[0], searchKey[0].toUpperCase());