Discussions

 View Only
  • 1.  only view fields if use is in given field

    Posted 04-12-2022 14:46
    So I work for a real estate company and there are multiple agents listed on a transaction record. Each agent can't see the other's information which is listed in the transaction. I want to be able to hide fields if the user is in the role "agent 1" or hide different fields if the user is in the role "agent 2"

    The solution is NOT to have a different record per agent per transaction, it won't work for a bunch of reasons I won't bore you with.
    Thank you!!

    ------------------------------
    Karah Weber
    ------------------------------


  • 2.  RE: only view fields if use is in given field

    Posted 04-12-2022 14:55

    No problem, you can do this easily using form rules.

    Set up a formula that starts with win the user is in the role. 


    you can also start a rule when multiple conditions are true. That will allow you to list multiple roles. 


    For example when the users in the role of agent one or the user is in the role administrator and show certain fields.



    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: only view fields if use is in given field

    Posted 04-12-2022 15:04

    Thank you Mark!
    Unfortunately I misspoke. The Agent is not in the "role" of agent 1, but is listed in the Transaction record Field called Agent 1.
    So I can't restrict with the form rules. 
    Also, each agent can sometimes be agent 1 or agent 2, it just depends on the transaction.

    Sorry for the misstep, but I'm crossing my fingers that you still have a solution for me!

    Thank you again-



    ------------------------------
    Karah Weber
    ------------------------------



  • 4.  RE: only view fields if use is in given field

    Posted 04-12-2022 16:55

    Ok, well still no problem.

    "When agent 1 is the current user then show or hide"

    Of course this assumes that these agent fields are user fields.



    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: only view fields if use is in given field

    Posted 04-12-2022 18:26

    To add on to Marks solution - if the fields they each see are totally different, consider making 2 sections named Agent 1 and Agent 2 and putting the relevant fields in each.

    Then simply hide each section using Marks advice. I find this much easier than parsing through a dozen fields and making sure I am hiding and showing the right ones.



    ------------------------------
    Mike Tamoush
    ------------------------------



  • 6.  RE: only view fields if use is in given field

    Posted 04-12-2022 18:42
    Good idea Mike, I will do that when I'm editing the formatting.

    Mark, here is a picture of what I'm seeing on the dynamic form rules. I don't see where I can make the rule for "Agent 1 is current user". 
    Is the rule supposed to be made somewhere else?
    Thank you!


    ------------------------------
    Karah Weber
    ------------------------------



  • 7.  RE: only view fields if use is in given field

    Posted 04-12-2022 18:48
    Edited by Mike Tamoush 04-12-2022 18:50

    If I remember correctly you need to 'trick' QB a little for this one. Make a formula user field called [Current User] with the formula User()

    Then in your dynamic formula select is equal to 'the value in the field' [Current User].

    In fact, when I do this I usually say, multiple conditions:
    Condition 1: Agent 1 user is the value in the field, [Current Uder]
    OR
    Condition 2: The user is in the roll administrator.

    This way, I as the admin get to see both sections. I find it helpful not to hide things from myself, but others want it to look clean for themselves as well, so a bit subjective.



    ------------------------------
    Mike Tamoush
    ------------------------------



  • 8.  RE: only view fields if use is in given field

    Posted 04-12-2022 18:55
    Yes, I agree with Mike.  Not sure why that option is not always offered up natively.
    But having said that, I just did a test and it actually defaulted to offer that choice <the current user> .  can you tell me the field type for that field?  Is it a User field type?

    Maybe it is a List User field type?

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------