change user dropdown based on email address in another field

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I have a script that inserts data from an email into a table (it's a help desk ticketing system). Since the email would come from an existing person in our organization, the User is already in the app. There is a "Created By" field that is a lookup field on the User table. If I try to insert the user's name (the "From" field has been parsed down to produce the user's First/Last name) into the "Created By" field via the API, nothing happens. I don't know if that's because (a) it's a dropdown field, or (b) if the value I'm trying to insert doesn't exactly match a user.

In any event, it would be handy to be able to insert this data. If I had to insert it into a different field, and then do a lookup on the value, and change the "Created By" field to match that value, how would I go about doing that?


Photo of BobSawyerGCM

BobSawyerGCM

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,806 Points 50k badge 2x thumb
Try inserting the user's email address.  There are lots of "John Smiths" in this world, so using just a regular name is not going to work, as that is not a unique identifier for a user.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,064 Points 20k badge 2x thumb
>There are lots of "John Smiths" in this ...

There are 46,777 people in the U.S. named John Smith.
http://howmanyofme.com/search/?given=John&sur=Smith&sub=Search+Names&ofage=yes
Photo of BobSawyerGCM

BobSawyerGCM

  • 0 Points
Ha! Fortunately, our organization is small, and (so far) everyone's name is unique. At some point it could become an issue, of course..
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,806 Points 50k badge 2x thumb
I mean that the names are not unique across all QuickBase users.  I guarantee you that some of your employee's names are duplicates with other QuickBase users First / Last names elsewhere in the world.
Photo of BobSawyerGCM

BobSawyerGCM

  • 0 Points
I get that -- but the app is internal to our organization. If I review the names in the Users table connected to this app, it does not contain all QB users. In any event, I'm working on parsing the user's email from the "From" headers and will try that. Stand by.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,806 Points 50k badge 2x thumb
userids are universal and unique across all users on the planet.
Photo of BobSawyerGCM

BobSawyerGCM

  • 0 Points
Gotcha. Didn't realize that, but it makes sense. And, that worked. Thanks for the assist!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,806 Points 50k badge 2x thumb
my pleasure