Providing the Value Help

Objectives
After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • List the steps for creating foreign key based and modeled value help view

Value Help

If there is an association for a field, you can use this association as a check table for the field. Then, you can provide a value help for the user. The following steps are used to provide value help with foreign key association:

  1. Find appropriate association for value help.
  2. Annotate the selection field with @ObjectModel.foreignkey.association.
  3. Expose the association.

In the figure below we see on the left side of the CDS View Z_H_VH_CustomerName which we use as Value Help in our CDS View Z_C_U2L1_Demo1 for our report.

Although it's easy to declare a foreign key based value help, it has the following limitations:

  • Normally, only technical key fields of a business entity have the association to other views, which are fields we want to hide from the end user.
  • In the search help window, only the key field and one field annotated with @semantics.text:true can be displayed in the search result window.
  • All fields from check view are present as selection fields of the value help screen.

For a better user experience, use the following steps to create a modeled value help view:

  1. Create a CDS view, select data from existing table or CDS view. Expose only the fields you want to display in value help.
  2. You can add additional where conditions and calculated fields for your value help view.
  3. Create an association from your report CDS view to the value help view, associate them with a selection field, which is understandable by end users.
  4. Annotate the selection field with @Comsuption.valuehelp:'<association_name>.
  5. Expose the association.
  6. You can add full text fuzzy search function for your value help by adding @search annotation in your value help CDS view.
Note
  • Do not use calculated fields as search conditions if they are not required, it may lead to performance issues.
  • For calculated fields in value help view, use @EndUserText.label to set a label.
  • Redeploy your report CDS view after you changed and activated the value help view.

Save progress to your learning plan by logging in or creating an account