Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: Data source query from dialog  (Read 3288 times)

steros

  • Newbie
  • *
  • Posts: 2
    • View Profile
Data source query from dialog
« on: February 27, 2020, 02:00:12 PM »
I have to set sql of datasource based on dialog form input, like:
 ... where [db_field]=$S{Dialog.lineEdit.text}

How can I do ?

Thanks

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1005
    • View Profile
Re: Data source query from dialog
« Reply #1 on: February 27, 2020, 02:59:58 PM »
Hi!
You can create a query with a variable like this:
Code: [Select]
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:
Code: [Select]
Dialog.lineEdit.text = getVariable("CustomerID")
Dialog.exec();
setVariable("CustomerID",Dialog.lineEdit.text)
 

steros

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Data source query from dialog
« Reply #2 on: February 27, 2020, 03:12:30 PM »
Perfect, it works ! Thank you very much !