Non-visible fields in the Table browser

As developers and consultants often require the ability to check the content of hidden fields without writing a select statement / query, or taking a quick look in the database for retrieving information, I was wondering if there is a way to do that.

The SysTableBrowser class is using the FormBuildControl.addDataField(int dataSourceId, fieldId fieldId) method for bound and FormBuildControl.addControl(FormControlType controlType, str controlName) as an unbound control. These methods are on kernel level, and they are forcing to hide any bound controls where the field property Visible is set to No.

We can add the hidden fields as extra columns in the SysTableBrowser class with a highlighted color, but as the display grid is tied to the datasource we are using it is not possible to populate it with the right values per record.

What we can do though is create a temporary table where we reference the current table, record and field identifiers, and store the relevant data in the dedicated base type fields:

Then we have to add our temporary table to the \AOTFormsSysTableBrowser form, prepare the link to the datasource by the record id reference in it’s initialization:

When the actual cursor moves on a record (the FormDataSource.active() method is called), we want to populate our table with the right data, then it can be displayed in the TmpGrid grid control which is hidden by default:

The final result looks like this, all of our non-visible fields are added to the Table browser and we can see the rest of the data too:

The XPO file is available on the following link for download, with column highlighting and hidden group hiding additions
PrivateProject_WIK_SysTableBrowser.xpo

Hope you like the tool, you may leave feedbacks as comments.

DAXRunBase / 2010-04-19 / AX 2009
Tags: , , , , , , ,

Comments

  1. Ruslan Goncharov - 2010-05-06 @ 18:51

    Nice work!

    And now you may add a checkbox 'Show hidden' to show/hide hidden fields.

    Reply
  2. DAXRunBase - 2010-05-07 @ 07:48

    Thanks!
    I have implemented the show/hide option via an optionvalue for the lower grid.

    Reply

Leave a Reply

Your email address will not be published / Required fields are marked *