PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Hiding Query Columns  (Read 68 times)

James Zukowski

  • Diamond Member
  • *****
  • Posts: 143
    • View Profile
Hiding Query Columns
« on: July 31, 2020, 12:47:41 PM »
Is there a way to programmatically Hide/Show specific Query columns? Rather than have 2 or more separate queries, we would like the program to be able to identify any columns different from standard.
Thanks!
James Zukowski
Programmer / ERP Analyst
Beauty Enterprises, Inc.
150 Meadow St.
Hartford, CT 06114
860.296.9303  Ext 231

Jane Raymond

  • Staff
  • Diamond Member
  • *****
  • Posts: 240
    • View Profile
    • PVX Plus Technologies
Re: Hiding Query Columns
« Reply #1 on: July 31, 2020, 01:36:08 PM »
If you have the PxPlus security system set up, then you can assign security to specific fields in the data Dictionary. When the query runs, the security setting for each field is checked and the field is displayed or not depending on that setting.


If there is no security set up, then there is really no way to change the query column settings programmatically prior to display. You could conceivably create a formula column that displays the value (or not) depending on a TBL() condition, e.g. TBL(%showcol=1,"",myfield$).


Another thought would be to set the column as hidden in the definition, which means that the initial display of the query will hide the column. The end user can then use the run-time Hide/Show/Reorder Columns feature to show the column. For those users who should not see the column, you can suppress the Hide/Show/Reorder Columns feature by adding "H" to %nomads'Query_Suppress_Popup$ on their system.
Jane Raymond
Software Developer
PVX Plus Technologies Ltd.

James Zukowski

  • Diamond Member
  • *****
  • Posts: 143
    • View Profile
Re: Hiding Query Columns
« Reply #2 on: July 31, 2020, 03:56:00 PM »
In this case, it would be based on the program being run, not the person running the program. From what it looks like, it will be easier to simply copy the query and add/remove columns we choose.
Thank you!
James Zukowski
Programmer / ERP Analyst
Beauty Enterprises, Inc.
150 Meadow St.
Hartford, CT 06114
860.296.9303  Ext 231