Columns Selector

The Default List object is the web panel created in order to manage the data and work with the records. From this screen, you can filter records, execute action over them, export the information, etc.

The Challenge

The customer requires to customize the default list to display fewer columns by default, to avoid having a horizontal scroll:

SelectionFeatures_img08

All the information that the grid contains is important for the end-users. By using the Column Selector, the end-users will have the possibility of selecting which columns to show/hide.

You can customize which columns are going to be visualized by default when the screens load. You can also remove the columns that are not desired to have in the grid:

SelectionFeatures_img08.1

Run the application and visualize the results.

SelectionFeatures_img53.1

Using Variables

After some time, the client arranges a meeting to know about the progress development. The client visualizes all the screens and in the ‘Work With Persons’ (PersonWW) require that their users need to have the option to visualize the CompanyId value in the same column as the CompanyName or in separate ones.

Right now, you only provide the option to visualize the data in separate columns:

SelectionFeatures_img53.1

In order to achieve what the client needs, an option is to add a variable inside the grid, and in its property Load Code assign the value of CompanyId concatenated to CompanyName.

Observations:

  • When you insert a new variable in the form, the first thing that you have to do is define the domain/attribute/SDT/BC in which this new variable will be based on. In this case, as we want to display a description of Company you could define the variable based on Description domain. You could also define it as basic, like Varchar of 200.
  • The LoadCode property (available only for variables that are within a grid) defines with which value the variable will be loaded. It can be the result of another variable, of calling some procedure, of concatenating some attributes, etc. You can visualize some examples below:
    • &MiVariable = &AnotherVariable
    • &MiVariable = Proc.udp(&parm1, att2, …)
    • &MiVariable = Att1 + “ “  + &Var2 …

SelectionFeatures_img53.2

Make these changes and run the application in order to visualize the results.

SelectionFeatures_img54

Go to visualize CompanyName and notice that CompanyName has a link, and if you make click in that link it will call the View object of the transaction Company. This is an automatic behaviour of WorkWithPlus, named Autolink.

The new column that we create does not have this behaviour (as it is a variable), so it is necessary to add the behaviour manually. In order to do that, use the ‘Link’ action as it is displayed in the following images:

SelectionFeatures_img55

SelectionFeatures_img56

Run the application and test what you have developed:

SelectionFeatures_img57

In the following video you can see an overview of this functionality:

Summary

Well done! You should now be able to:

  • Customize the Column Selector
  • Add and load variables within the grid
  • Customize the Autolink behaviour