Remove unwanted columns from personalization(P13n) Dialog popup.
Whenever we use a smart table and bind it with a entity set, it automatically takes cares of everything. It shows four sections of Columns, Sort, Filter and Group respectively in personalization dialog having all the required columns in each section. But based on our requirement , sometime we don’t want to show some unwanted columns in table or in a particular section of p13n dialog.
This can be done in multiple ways . we can control the visibility of columns by directly editing the entity with which smart table is binded. But, There is a simple method , we can achieve this by simply modifying our view without doing any changes in entity.
Let’s take an example, we have a smart table populated with some data as below
Changes to be done to achieve below requirements:
Req. 1: if we don’t want to show a column neither in smart table nor in p13n Dialog popup which is already present in the entity and initially coming in the table. For e.g., we want to remove Sales Order ID and Item Position, then we just need to add the required column in ignoredFields property of smart table.
Req. 2: If we want to show any column in table but don’t want to show in filter, sort, and group section of p13n dialog popup. For e.g., we want to only sort but not filter based on Product ID similarly we want to filter but not sort based on Gross Amount, then we just need to add custom column for both Product ID and Gross Amount in table and need to provide the required property for the column.
Here I have given only sortProperty for Product ID column and only filterProperty for Gross Amount column in p13ndata as given in fig.
Now, we can see that both Product ID and Gross Amount is coming in columns section of p13n dialog.
And in sort section Product ID is coming but Gross Amount is not there in this section to select from.
similarly, in filter section Gross Amount is coming but Product ID is not there in this section to select from.