hide column in data grid

1
is there anyway to be able to hide a column in a data grid based on the language of the current user?
asked
4 answers
2

You could create separate forms for users with different languages. To do this you need to retrieve the language of the user.

So navigate to the forms through a microflow where you retrieve the language of a user and decide which form the user should see. Something like this:

  • Retrieve user language.
  • If user language is Dutch?
    • Then open form Dutch
    • Else open form English

That is one approach. You could also do this with 1 form and conditional formatting. To use conditional formatting, you need an enumeration. What you can do is creating a microflow attribute on the entity which you want to show.

In this microflow attribute you need to retrieve the language of the user and set a enumeration value. For instance, English or Dutch. Then you can restrict rows with conditional formatting on the enumeration value.

This way you can create one form, but you can restrict the columns in the datagrid for each language.

answered
0

You can use security based on the language if you just want to hide the contents of the column, rather than the column itself.

answered
0

I use a virtual attribute to get the column attribute value based on the loggedin user language.

  • but the problem arises with sorting, as i can not sort the data-grid based on virtual attribute, so I rethink again if there is a way to hide/dispaly the column to show the appropriate attribute language description
answered
0

It looks like you want to translate data from the database. You can consider putting your descriptions in a separate related entity (languagecode+text) and constraint with an Xpath on language. You can do anything you want.

answered