Setting Contact column to Placeholder using the API
I am programmatically updating a sheet using the SmartSheets API. I need to set a column that is a CONTACT type to a Resource Manager placeholder. When I do, I get the error message "The value for cell in column 6143599851818884, did not conform to the strict requirements for type CONTACT." Typically a contact can be set using the email address. However placeholders do not have email addresses so I attempt to set the placeholder text.
As an FYI, the field I'm trying to set is the Assigned To which is used in the RM integration.
When I look at the raw data for an existing value containing a placeholder it looks like
{
"columnId": 6143599851818884,
"value": ".NET Placeholder"
}
Where as a typical user looks like
{
"columnId": 6143599851818884,
"value": "joshua.user@company.com",
"displayValue": "Josh User"
},
Using the APIs, how can I set the column value to the placeholder text?
Answers
-
Try adding the
overrideValidation = true
in the query parameters, and within the cell object addstrict = false
-
Good idea. Unfortunately still didn't work. Still get the error: The value for cell in column 6143599851818884, did not conform to the strict requirements for type CONTACT. Smartsheet support said that what I wanted to do was not supported.
-
@hiker360 I did the below workaround using API python. THe Contact List was just too complex and not flexible for me to work with.
Column A is my picklist and column B is a cross-sheet reference to the directory to capture email. As new records are registered in the sheet directly or via a form, I have automation in place to send update emails as specific information is updated or nearing a deadline.
First, I get the Column ID info.
import smartsheet
smartsheet_client = smartsheet.Smartsheet('INSERT TOKEN')
action = smartsheet_client.Sheets.get_columns(SHEET ID, )
columns = action.data
for col in columns:
print(col.title)
print(col.id)Then, I update Column A to a picklist with options.
import smartsheet
smartsheet_client = smartsheet.Smartsheet('INSERT TOKEN')
column_spec = smartsheet.models.Column({
'type': 'PICKLIST',
'Options': [
"INSERT NAME 1",
"INSERT NAME 2",
"INSERT NAME 3",
"INSERT NAME #"
]
})
response = smartsheet_client.Sheets.update_column( SHEETID, COLUMNID, column_spec)
updated_column = response.result
So far, I have not hit a ceiling as my records < 1K.Erin Horiuchi Green, MBA, LSSYB, PSMI
Process Manager
Syneos Health
Please kindly like ❤️, upvote ⬆️ and/or mark ✅ any of my contributions that have provided value.
Core App and Project Managment Certified 🚀
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.4K Get Help
- 424 Global Discussions
- 221 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 144 Just for fun
- 61 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives