User Defined Function

DriveWorks Pro User Defined Function

    • CAD Customization

DASListRemainingTask

 

Why was it required?

One of our clients wanted to show the pending task to be left out by the user on the UI.

In Driveworks, current functionalities do not have any tasks to fulfill this requirement directly using any functions. This can be achieved using existing functionality by creating calculation table by adding control name, control caption, error result, color for the font, error string with color for each form controls. The maintenance of the data in the calculation table is time consuming and redundant method to add data if new control is created on UI.

To achieve this requirement, we created one user defined function which is time effective and less maintenance.

Description:

The user defined function “DASListRemainingTask” is to list all the pending tasks to be left out by user on the UI. This function will look for all the controls within the project forms and error result written in the behavior.

The function has 5 arguments:

  • Navigation Page Name:
    • The name of the form to list the remaining task of the controls.
  • Navigation Page Name Color:
    • The color of the navigation page name to be displayed.
  • Control Name Color:
    • The color of the control name to be displayed.
  • Control Error Message Color:
    • The color of the error result to be displayed.
  • Sort By Tab Index?
    • Sort the controls by tab index to be displayed.

The result of the function contains all the form controls with error result along with the form name title.

Form Name Title

Control Name

Error Result

Control Name

Error Result

Control Name

Error Result

The above image represents the use of the user defined function “DASListRemainingTask”.

  • In the project there is one Navigation Form named “Details”.
  • Details form has three controls: Name, Age, City with error result.
  • As input is filled result of the function will be updated as shown below.

  • The below image shows how to use the function.