Show/Hide list fields based on a condition using settings.js

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DFerati
    Junior Member
    • Apr 2024
    • 19

    Show/Hide list fields based on a condition using settings.js

    Hello,

    I want to hide the assignedUser globally by a condition, however, I can see the code but since it's something not declared as a custom file, I cannot find an approach to accomplish my requirements, specifically I want to remove the assignedUser field if the user is not an admin, I see the code how it works by being cached at "client/src/helpers/list/settings.js" but I do not know how to extend it so I can apply my own custom code




    ​ ​
  • ChrisSka83
    Senior Member
    • Apr 2023
    • 197

    #2
    This could be solved with dynamic logic. You don't have to rewrite anything in the code.

    Comment

    • DFerati
      Junior Member
      • Apr 2024
      • 19

      #3
      Hello Chris, apologize for the late reply, I was on vacation, however how would that work?, I am using the plain Espo configuration without add-ons

      Comment

      • DFerati
        Junior Member
        • Apr 2024
        • 19

        #4
        Originally posted by DFerati
        Hello Chris, apologize for the late reply, I was on vacation, however how would that work?, I am using the plain Espo configuration without add-ons
        Also for more context, i want to add that I did look up to dynamic logic feature, but the issue is that its condition declaration is very static, my request considers that I modify the state of an item at entity lists (doesn't appear to be supported based on documentation at dynamic logic panel), based on it's role.
        Example:
        I have 3 roles, Admin, Manager and Agent, keep in mind that the Admin role isn't a user type of admin, it's a regular user. The admin and manager should view who's assigned into the entity, but the agent shouldn't so my goal is to hide assignedUser from it's list view of entity type if the user is an agent

        Comment

        Working...