Display Functions

Home » Other Functions » Javascript » Display Functions
Javascript No Comments

Some scripts are required if data is not displayed with the values one would expect. Often the display can be changed.

Set The Display of Boolean Values

The default display in a grid view is True or False whereas in a Search View it is Yes or No. If you wish to change the system to display consistently it is easiest to change the grid as follows.

In this example the field is set to display values of Yes or No.

model.Actions[0].Priority? “Yes”:”No”;

Running Searches on Related Data from A Detail View

It is useful functionality in many cases to run a search from a related detail view. For example from the detail view of a customer run a search on jobs for that customer.

PopupService.doSearch(‘TN_Job_Search1’,false,{“Customer” : model._id},model);

Setting a Field Value Based Upon A Condition

This is useful if you wish to set a field value (string etc) based upon another field.

script5