Configuring Widget & View Defaults

Setting default properties for new widgets

When a new object is created in UX (wizard, view, dashboard, widget). It gets created with a set of default JSON properties to manage its behavior or appearing (size, color, custom formatting, etc..). It is possible to edit the default properties that get applied to a new object when it is created from scratch. These default properties are stored in the ContentStore in the cube }ElementAttributes_}APQ UX AppSubType.

The 2 attributes you can set the values of which affect behavior are:

  • DefaultClass : sets the class for the object
  • DefaultJSON : sets the default value of the Options json object for when a new object is created

The other attributes determine the behaviour of the App Management utility while editing views:

  • Caption : determines the display caption in the picklist presented the the report builder when selecting widget types
  • Inactive : flagging as inactive=true with a value of 1 will suppress the object type from being displayed to the uset inthe picklist when creating new objects
  • Position : can be used to control the ordering of widget types within each picklist

Note: although the dimension is called }APQ UX AppSubType the dimension contains ALL UX object types and catalogs which objects can be components of which other objects. So this is also the location the set the default Options json for View, SubView, Wizard, etc.

Setting default properties for views

You can also set default view properties. This is done on a per cube basis within the cube }APQ UX ViewDefinition Defaults. This determines per cube which dimensions (or hierarchies) will when creating a new widget where a cube is selected as source which dimensions will be arranged by default on fixed, filter, rows & columns. If no default json object is provided then the ViewDef json object won't be set on creation and all dimensions of the cube will be unassigned.

Selecting a sensible default layout means that immediately on creation the view will already be functional and can be opened without errors. This can save a lot of time when building reports for frequently used cubes.  

Note that there are several different json objects. This is because the valid arrangement of dimensions varies depending on what object type is selected.

  • Dashboard JSON : the ViewDef for dashboards holds global fixed and global filter dimensions only.
  • Widget JSON : the ViewDef for widgets can hold internal fixed, internal filter, row and column dimensions.
  • View JSON : the ViewDef for views can hold global fixed, global filter and row dimensions only.
  • SubView JSON : the ViewDef for sub-views can hold internal fixed and column dimensions only.

Feature coming soon(?)

The easiest way to set default ViewDef json object is to copy from the ViewDef attribute in }ElementAttributes_}APQ UX App into the appropriate "Default <objectType> JSON" measure in  }APQ UX ViewDefinition Defaults.

It is intended to include a button or other mechanism in the App Management to "set as default view definition" from the front end, however, this isn't yet available.

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.