API not returning conditionalFormat info

edited 12/09/19 in API & Developers
08/09/18 Edited 12/09/19

I have a smartsheet that uses conditional formatting.  I want to be able to make a call to the API requesting information about the  row's conditional formatting. My api call, C# - 

Row row = smartsheet.SheetResources.RowResources.GetRow(sheetID, rowID, new RowInclusion[] { RowInclusion.COLUMNS, RowInclusion.COLUMN_TYPE, RowInclusion.FORMAT }, null);

 

The row object returns "conditionalFormat=null", also "Format=null". I have confirmed that this is the row with the conditional formatting applied.

In the documentation I came across this - 

"Use the "include=format" query-string parameter on API operations that return detailed objects, such as GET /sheets/{sheetId} or GET sheets/{sheetId}/rows/{rowId}. If there is formatting other than default settings, the return includes a format property. If an object has conditional formatting, the format property returned will have a conditionalFormat value."

I have tried several different approaches, including cURL calls, and I have not been able to get info on conditional formatting. I may be overlooking something, any help would be appreciated.

Thank you

format_code.png

Popular Tags:

Comments

  • Hello—

    Looks like you've got an extra dash in your RowInclusion.COLUMN_TYPE element. (Not sure if that was a mistype when copying your code over to this community post.)

    It's also possible that although conditional formatting is applied to the sheet itself, that specific row may not have the formatting applied to it.

    I'd recommend expanding your GET to include the optional cell data to make sure it's returning the same Row ID you're looking at in the source sheet: https://smartsheet-platform.github.io/api-docs/?csharp#get-row

    You might also try turning conditional formatting off (disable your rules in the sheet) then apply specific formatting to a cell and see if your call displays the FORMAT element, at least.

    If you're still running into issues after trying the above, reach out to our Support team and they can troubleshoot further with you.

Sign In or Register to comment.