Hi, totally new to servoy and java. I am trying my best to understand and learn things but its a big learning curve.
Basically I have a form, linked to a table that has ‘MFNO’ as the unique key.
I want a search box on a form with a button so that when I enter a specific MFNO in the text box and click the search button, it finds the record in the table and displays a few fields from that table on the form.
I have no idea how to do this. Can anyone help, I know its simple.
if(foundset.find()){ // Enter find mode
city = 'Berlin'; // Assign a search criteria
foundset.search(); // Execute the query and load the records
}
Your code will have to look something like this:
var searchCity = ""; // bind this form variable to the search field
if(foundset.find()){ // Enter find mode
city = searchCity; // Assign a search criteria
foundset.search(); // Execute the query and load the records
}
Ususally the form variable declaration will be at the top of the forms *.js file and the search code could be in the function that handles the click event for the search button.