Discussions

 View Only
  • 1.  Adding new records based on user recognition

    Posted 05-12-2022 17:33
    Edited by Chris Swirtz 05-12-2022 18:26
    I have an app with a Companies Table and an Offices Table which have a 1 Company can have many Offices relationship. Is it possible to set it up so that when a User from one of the Companies logs into the system, they can create a new Office linked to their Company without having to find their Company first and click the Add Office button?

    For instance, if Jon Smith from ABC Company logs in (ABC Company being a Company listed in the Companies Table), QuickBase doesn't recognize that Jon is affiliated with ABC company based on the email or something like that correct? I would need to somehow link Jon Smith to that ABC Company Record Right?

    ------------------------------
    Chris Swirtz
    ------------------------------


  • 2.  RE: Adding new records based on user recognition

    Posted 05-12-2022 18:33
    You would need to set up every user in a Users table in the app - a new table, not the User icon at the top left.  Then make the Key field their userid.  The associate each employee record with the company they belong to via a relationship with Companies.

    Then on offices you make a relationship to users based on a reference field of [Current User] with a formula of User().
    The look up their Company or related company.

    The have a  form rule populate the company field if its blank.

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



  • 3.  RE: Adding new records based on user recognition

    Posted 05-13-2022 09:14
    Thanks Mark,

    So adding a new user to that User Table would have to be done manually by someone correct? Perhaps make it a function of whoever does the inviting of users to also add them to the Users Table?

    What about adding a User-List field to the Companies Table and selecting every User that is affiliated with that Company. Could we utilize something like that?

    ------------------------------
    Chris Swirtz
    ------------------------------



  • 4.  RE: Adding new records based on user recognition

    Posted 05-13-2022 09:53

    See my responses in bold below. 

    So adding a new user to that User Table would have to be done manually by someone correct?  Yes



    Perhaps make it a function of whoever does the inviting of users to also add them to the Users Table?  Well yes but totally separately and manually. 


    What about adding a User-List field to the Companies Table and selecting every User that is affiliated with that Company. Could we utilize something like that?  No, that won't work.   The issue is that when adding a record the form needs to default the companies field so the user doesn't have to enter it manually. In order to default it in it needs to do a look up from the user stable to see which user is logged in and what their usual company is. 



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



  • 5.  RE: Adding new records based on user recognition

    Posted 05-17-2022 16:32
    Thank you for your continued help with this, you have been a big help as per usual.

    I was questioned today if the use of User Groups could be applied to the functionality I am trying to achieve above. My gut feeling is no but wanted to get your thoughts on on it.

    The app I am working on was originally built by the client and ultimately abandoned but they are having my company add new functionality to it. Seems they utilized a method were when a related contact was created to the Company they would select a checkbox of a role and then use that related contact as a summary field on the company to tie a specific user to the Company instead of the ways we have talked about. Personally it seems kind of messy, or is that just another way to go? Or does what I am describing even make sense?

    ------------------------------
    Chris Swirtz
    ------------------------------



  • 6.  RE: Adding new records based on user recognition

    Posted 05-17-2022 17:27
    Edited by Mark Shnier (Your Quickbase Coach) 05-17-2022 17:27
    I can't really say if that method will or won't work. I'm having trouble picturing those relationships in my mind.

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



  • 7.  RE: Adding new records based on user recognition

    Posted 05-18-2022 09:25
    I am having trouble figuring out how they worked for them, or if they did at all.

    ------------------------------
    Chris Swirtz
    ------------------------------