let Anum = "Amy51"; wixData.query("Artists") .eq("artistNumber", Anum)
This query works for testing. This is on a dynamic item page. What I would like to do is get a string from a text page element and use this for the search criteria. I would imagine something like the following would work, but it doesn't.
#someTextElement is connected to data and displays correctly. I'm using $w.onReady so timing shouldn't be the issue. Also, same code in another screen works fine for looking up the data record with data inputted by the user using. The collection field is a text field.
Anum = $w("#ArtistNumber").value;
Please help. Thank you.