Hi!
You can create a query with a variable like this:
Select * from customers where CustomerId = $V{CustomerID}
then create some dialog with the line editor for example.
In the init script you can write something like this:
Dialog.lineEdit.text = getVariable("CustomerID")
Dialog.exec();
setVariable("CustomerID",Dialog.lineEdit.text)