Conditional Layouts Based on User and Field Value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • IshitaRana
    Junior Member
    • Apr 2025
    • 11

    #1

    Conditional Layouts Based on User and Field Value

    Hi,

    I’m trying to implement conditional layouts based on both the user and the value of a field.

    Scenario:
    I have two users — User 1 and User 2. Both can access the Case entity.
    1. When the category field (in the Case entity) is not "Closed":
      • User 1 should see Layout 1
      • User 2 should see Layout 2
    2. When the category field is "Closed":
      • User 1 should see Layout 3
      • User 2 should see Layout 4

    So the layout should depend on:
    • The current user, and
    • The value of a specific field (e.g., category)


      Is this kind of conditional layout setup possible in EspoCRM (either in the main UI or portal)?
      If yes, what's the best way to achieve this? Through custom views, metadata conditions, or dynamic layout scripts?
  • dreginald
    Senior Member
    • Sep 2018
    • 149

    #2
    Suggest work around using Tabs with Conditional view. You may have to create duplicate fields to be used in both the tabs. With feature available from the front end, this is one of the way to achieve it.

    Alternatively, make both users in separate teams and use Layout Set 1 for one team and Layout Set 2 for another team two
    Last edited by dreginald; Yesterday, 05:40 AM.

    Comment

    • yuri
      Member
      • Mar 2014
      • 9174

      #3
      Switching layouts completely depending on record values is not possible. Showing certain fields can be done with Dynamic Logic.

      Using Layout Sets for different users is a fine approach. Hence, there will be a combination of Layout Sets and Dynamic Logic.

      It's also possible to have dynamic logic checking the user or the user teams. In this case, the Layout Sets is not needed. The downside is that the layout is the same, but only fields are not visible or visible.

      Click image for larger version

Name:	image.png
Views:	17
Size:	15.2 KB
ID:	119710
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      Working...