PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → Filter
Filter
Started by Peter Purton, Apr., 16 2019 7:40 AM - 1 reply
Posted on April, 16 2019 - 7:40 AM
Hi All
A question, I have a data file called General Ledger
Which has a radio button, with a selection of Asset, Liability, Capital, Revenue, Expense
I also have a data base, called Inventory which has default selections for Expense, Liability etc.
I need to filter the search on the General Ledger for the selected default General Ledger type
Sorry for my lack of datail
Thanks in advance

Peter
Posted on May, 12 2019 - 9:34 PM
Check your data file and you may realize that the Radio Button selection returned and stored the integer value of the selected radio option; it did not store the assigned option caption. From the order by which you structured the list of radio button options in your question, an "Asset" would return a 1, "Liability" a 2, "Capital" a 3, "Revenue" a 4, and Expense a 5.
If in your Gen'l Ledger you stored the actual nouns, (i.e., Asset, Liability, Capital, Revenue, Expense), then to filter the items you will have to convert the radio option selected # (e.g. Use CASE statements to return a corresponding filter string) to create the Search word representing the option selected. Alt: Using a combobox you could use sSearch = combobox..displayedvalue
after the selection has been made.
Using Radio Options, Listbox, or Combobox selections is a great way to keep dyslexia from impacting user-typed-in values so long as you later correlate the integer values to user readable tables, reports, or exports. Believe WinDev attempts to do this in RAD tables and forms based on field info/characterization in the Analysis. Check also WinDev examples.