Inconsistent results when using contact list columns
I am attempting to use the API to perform CRUD actions on a sheet. Several of the columns have Contact/Multi-Contact datatypes.
I have discerned through practice that when I create or update a row, that the API expects the email of the contact to be provided in the request. Question number 1: Is that actually the case? I have not found documentation confirming this.
My other, larger issue is that I am getting some consistently inconsistent behavior when using specific contacts. For example, Contact A, B, and C all get written to the sheet using their name. Contacts D, E, and F all get written to the sheet using their email. This leads to major issues when retrieving and parsing the column values later.
Answers
-
Hello @Andrew Finkernagel,
After some testing with API, I was able to confirm that an Email is required during the POST if updating a cell. Heres what it may look like if you are using PostMan:
This will post testing@gmail.com into the first cell of my Column. See more on updating rows, and working with complex objects here:
Update Rows: https://smartsheet-platform.github.io/api-docs/#update-rows
Complex Objects: https://smartsheet-platform.github.io/api-docs/?shell#working-with-complex-objects-multi-contact-or-multi-picklist
In addition to this, if you POST an Email into a cell, and it only shows an Email Address rather than a Forename and Surname, it may be that either 1) The User hasn't set their name in their Personal Settings, 2) This user doesn't have a set name in your Contacts. For more on these, please see the below articles:
Personal Settings: https://help.smartsheet.com/articles/796268-adjusting-personal-settings
Contacts: https://help.smartsheet.com/articles/796143-managing-contacts
If you don't mind me asking, what was the call made, and what were the results when attempting to POST? If possible, please provide screenshots, ensuring that you hide your API Token
Regards
Sean
-
Hey Sean,
Thanks for taking the time for the detailed response. I will certainly take a look at those articles you provided. I suspect that the inconsistency has something to do with one of those, since the behavior is "consistently inconsistent" where specific contacts display as {First name} {Last name} and other display as {Email address}. I wound up "coding around" this with some client-side RegEx's that determine whether the GET response delivers a name or an email, but it's certainly not ideal.
I have been making my calls through the node.JS SDK package. I've attached a screenshot of the code I've been using to accomplish this. If anything stands out as particularly wrong or out of place, please do advise.
Thanks again!
Andrew Finkernagel
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives