UDF: Step By Step

In this post I want to provide an in depth guide that shows the creation and usage of defined fields in both WebReports and VDM.



Why Use Defined Fields?

Defined fields can be used as filter criteria. If users have been set up in WebReports you can apply / do data restrictions based off user defined fields or return the field in the columns to do additional work.

Where Can You Use Defined Fields?

Defined fields can be leveraged in WebReports and VDM. They can be returned in the views data (detail, FR, Visualize, etc.) or used as filter criteria in the FSGS.


Step 1. Adding Defined Fields In WebReports


NOTE: Defined Fields are added on the Defined Fields page under the Management tab of WebReports.


1. Click on the Defined Fields page under the Management tab.



2. Click the Add button under the Execute section.



3. Enter a Name for the new defined field.



4. Enter a Query Identifier for the new defined field.



5. Enter a Description for the new defined field.



6. Click the Save button on the new defined field.




Step 2. Assigning Defined Fields In WebReports


1. Click on the Users page under the Management tab.


2. Click the Edit User button on the user you want to assign a defined field to.

Note: You may need to use the slider to make the buttons visible (depending on screen size and zoom)



3. Expand the Defined Fields drop down.


4. Select the Defined Field you want to assign to the user and enter the value to be returned.

NOTE: Enter any object identifiers (## / '' ) needed in the value.

This is the exact text replaced in the query


Example: 'String'


5. Click off the defined field selection and then click Change to update the user's defined fields.



Step 3. Using Defined Fields in VDM


Defined Fields for filter criteria (FSGS)


1. Open or create a view in VDM.


2. Click FSGS on VDM's main screen.


3. Select a field to filter on.



4. Expand the drop down for Value.



5. Expand the Defined Fields section.



6. Select the defined field you want to use for the filter.



Database Functions


1. Open or create a view in VDM.


2. Right click in the tables and field section and select Add Custom Field/Function.



3. Enter the database function to return the defined field.

NOTE: The database function will be the query identifier set when adding the defined fields in WebReports.



4. Enter the name for the defined field column.



5. Make sure the database function is set to your WebReports connection, then click Add.


6. Click Add to finish creating the database function.


OPTIONAL: Repeat steps 2-6 until you have all the defined fields you want being returned from the database function.

7. Run the view and verify your database functions are returning what you would expect.

NOTE: If they are not correct, verify they are setup properly in WebReports and that the database function was created properly.



7 views0 comments

Recent Posts

See All