QBF Selection and Table View (OpenInsight 64-bit)
At 27 APR 2020 05:08:06PM rdhull50 wrote:
Rober Hull
1) When setting up a query (i.e. determining what records to select) is it possible to select a checkbox?
That is, if there is a check-box on the form, how can you select all records where the check box is checked, ie. the column contains a "1"?
2) After you have run the query and want to display the result in a table, is there any way to control the setup of the table. i.e column order and which columns appear? What determines the order in which the columns appear?
Some symbolics appear on the left side of the table and some on the right. The columns don't appear to be in the dictionary order or in form or tab order.
At 28 APR 2020 05:35PM bob carten wrote:
Hi Robert,
Some GUI controls do not translate well to QBS, so OI ignores them. For example QBF does not inspect the value of checkboxes because it is difficult to know if an unchecked box means 'select where the field is false'
You can use an eventHandler on the QBFINIT or QBFEXECUTE to put up your own dialog. execute a query and put the list of keys in the QBFLIST property.
The QBFTABLE displays columns in their order in the control map. I think that would be close to the tab order.
At 14 JUL 2020 11:26AM Andrew McAuley wrote:
Following on from Robert's post, just a heads-up that we've documented the undocced bits of QBF.
World leaders in all things RevSoft
At 14 JUL 2020 06:50PM Barry Stevens wrote:
Following on from Robert's post, just a heads-up that we've documented the undocced bits of QBF.
World leaders in all things RevSoft
@Andrew McAuley, how can I get notifications of these postings.
At 14 JUL 2020 08:13PM James Birnie wrote:
Hi Robert
We ended up creating our own QBF equivalent logic and toolbar to overcome issues like this and extend it. So in the case of checkboxes you can change them to 3-state temporarily in the equivalent of the QBFINIT event, so that you can then determine which controls were changed, then created your own REDUCE statement based on user selections.
p.s. the oryxctl_set, oryxctl_get are typically just wrappers of a get/set_property → DEFPROP
.. and these equates
* checkbox control
equ checkbox_2state_style$ to 1342177283 ;* 50000003equ checkbox_3state_style$ to 1342177286 ;* 50000006equ checkbox_unchecked$ to 0equ checkbox_checked$ to 1equ checkbox_null$ to 2Hope this helps.
reset all radio buttons to null radio_controls = utility('OBJECTLIST', parent_window, OIWIN_RADIOBUTTON$) ;* note: each button is a seperate control no_of_controls = fieldcount(radio_controls, @fm) last_control =for i = 1 to no_of_controls this_control = field(radio_controls<i>,'.',1,2) if this_control # last_control then oryxctl_set(this_control,
) end last_control = this_control next i * reset all comboboxes to nulllist_controls = utility('OBJECTLIST', parent_window, OIWIN_COMBOBOX$)no_of_controls = fieldcount(list_controls, @fm)for i = 1 to no_of_controlsthis_control = list_controls<i>oryxctl_set(this_control, '')next i
** recreate all CHECKBOX controls so they can be set as "3-state" i.e. support nulllist_controls = utility('OBJECTLIST', parent_window, OIWIN_CHECKBOX$)no_of_controls = fieldcount(list_controls, @fm)for i = 1 to no_of_controlsthis_control = list_controls<i>this_struct = get_property(this_control, 'ORIG_STRUCT')this_struct<1, PSPOS_SDKSTYLE$> = checkbox_3state_style$this_struct<1, PSPOS_VALUE$> = checkbox_null$this_struct<1, PSPOS_ENABLED$> = true$x = Utility('DESTROY', this_control)x = Utility('CREATE', this_struct)next i… and then revert then back after the query is run
revert checkboxes back to just true/false statelist_controls = utility('OBJECTLIST' ,parent_window, OIWIN_CHECKBOX$)no_of_controls = fieldcount(list_controls, @fm)for i = 1 to no_of_controlsthis_control = list_controls<i>this_value = oryxctl_get(this_control)this_struct = get_property(this_control, 'ORIG_STRUCT')this_struct<1, PSPOS_SDKSTYLE$> = checkbox_2state_style$this_struct<1, PSPOS_VALUE$> = this_valuex = Utility('DESTROY', this_control)x = Utility('CREATE', this_struct)next i
At 14 JUL 2020 10:17PM bob carten wrote:
Hi Robert,
OI10.0.8 includes an alternative QBF query display named RTI_QUERYGRID_OIWIN
We have not documented it yet. To try it, use a quickevent in the QBFINIT event of your form.
When you initialize the QBF OI should offer you a grid which displays the data bound fields on the form and alows you to build a query. When you click apply the query will execute and populate the QBFLIST.
There is a similar function named RTI_QUERYGRID with the same parameters as Indexlookup. You can pass it the list of fields to query and the list of fields to display, It will present a similar grid, then display a popup for the user to choose a value.
There is still room for improvement in this querygrid, and, obviously, a need for some documentation from us. Please try it out in the beta and provide some feedback.
At 15 JUL 2020 07:25AM Andrew McAuley wrote:
Good question - it's something we assumed was part of Blogger but we're failing to find it. Pro tem you could checkout visualping.io and monitor the announcements section of our homepage?
World leaders in all things RevSoft
At 15 JUL 2020 08:31AM bob carten wrote:
Hi James,
Nice treatment of the checkboxes. Will incorporate into 10.
Thanks!
At 15 JUL 2020 08:43AM Carl Pates wrote:
FYI - In version 10 you don't need to alter the checkbox style and recreate - you can just set the THREESTATE property instead.
At 15 JUL 2020 06:45PM James Birnie wrote:
Thanks Carl - sounds good!