Show columns based on the Users Role
Please note that this is now available as a plugin for easier installation. While you can use this document as a reference, the recommended method to add…
- Not yet re-checked
- Classic builder
Moved from our previous help site and not yet re-checked against the current product. Last edited Sep 20, 2024.
This is a way to customize a table with different views based on the logged-in user's role. Follow the steps below for this great customization.
Step 1
Make sure you attach a specified role to each user.
Step 2
Add a CSS class for each assigned role, followed by the hide. Here I have management hide, packaging hide, shipping hide, and retail hide.
Step 3
Hover over the info icon on your page's data table to get the component ID.
Step 4
Add the following code to the JavaScript tab of your page.
TB.render('component_ID', function(data) {
if ('{loggedInUser.Role}' === 'Management') {
$('.management').removeClass('hide');
} else if ('{loggedInUser.Role}' === 'Packaging') {
$('.packaging').removeClass('hide');
} else if ('{loggedInUser.Role}' === 'Shipping') {
$('.shipping').removeClass('hide');
} else if ('{loggedInUser.Role}' === 'Retail') {
$('.retail').removeClass('hide');
}
});
Original Community Post:
https://community.tadabase.io/t/show-columns-based-on-the-users-role/1978
Was this page helpful?
Something wrong or missing on this page? Tell us.