How to update the value of a summary field if it's text?

Vishnu
Vishnu
edited 09/28/21 in API & Developers

We introduced a new process where our team needs to fill in a bunch of summary fields for every smartsheet.

I'm trying to update the data for summary fields using APIs for existing smartsheets as a backfill. I have all the data in a google sheet. I'm using Zapier to make the API call for every row in the google sheet.

I want to use the "Put" method but it doesn't seem to support TEXT_NUMBER.


curl https://api.smartsheet.com/2.0/sheets/{sheetid}/summary/fields -H "Authorization: Bearer <token>" -H "Content-Type: application/json" -X PUT -d '[{ 

"id": {SummaryfieldID},

"objectValue": {

"objectType": "TEXT_NUMBER",

"value": "Vishnu Test"

},

"index": 0,

"title": "Account Name" 

}]'

I'm getting an unsupported type error as shown below.

I'm from the Operations team and I used to be a developer (not that good as you can see).

What am I missing here? Or is this not possible at all?

Best Answer

  • Genevieve P.
    Genevieve P. Employee
    Answer ✓

    Hi @Vishnu

    You don't need to specify the objectType for Text_Number, as this will be specified under Type instead (keep scrolling down the page you screen captured). You can also list the objectValue right away as the value to update the Summary Field, like so:

    [{
        "id": xxxx,
        "title": "Title Text",
        "type": "TEXT_NUMBER",
        "objectValue": "Test Text"
    }]
    

    Let me know if this works for you!

    Cheers,

    Genevieve

    Need more help? 👀 | Help and Learning Center

    こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions

Answers