iSheets API version 2 - Common objects - iSheet view object
OVERVIEW
The iSheet view object consists of the following elements
<isheetview> <viewid>{iSheet view id}</viewid> <title></title> <markasdefault>0/1</markasdefault> <emailview>0/1</emailview> <columns> list of column objects </columns> <viewsortorder> <sortorder columnid="{column id}" ordertype="1" sortposition="1"/> (ordertype [1 = ASC, 2 = DESC]) <sortorder columnid="{column id}" ordertype="2" sortposition="2"/> (ordertype [1 = ASC, 2 = DESC]) </viewsortorder> <viewfilter> list of rows of common object </viewfilter></isheetview>
For JSON use the following format
{
"title": "TEST123 - to delete",
"markasdefault": 0,
   "emailview": 0,
    "columns": {
        "column": [
            {
                "columnid": 12131
            },
            {
                "columnid": 12143
            },
            {
                "columnid": 12138
            }
       ]
    }
    "viewsortorder": {
"sortorder": [
 {
 "columnid": 12131,
 "ordertype": "1",
 "sortposition": "1"
 }
 ]
 },
 "viewfilter": {
"row": [
 {
 "columnid": 12136,
 "operatorid": 8,
 "oprand": "Test Me",
 "logicaltype": "1",
 "sheetfiltervaluetypeid": "0"
}
 ]
 }
}
Note:
1. sortPosition [1 = first column sorting, 2 = second column sorting]
2. sortOrder (columnID) : sort order supports below column types
| Single line text | SHEET_COLUMN_TYPE_SINGLE_LINE_TEXT |
| Choice | SHEET_COLUMN_TYPE_CHOICE |
| Number | SHEET_COLUMN_TYPE_NUMBER |
| Date and time | SHEET_COLUMN_TYPE_DATE_AND_TIME |
| User lookup | SHEET_COLUMN_TYPE_LOOKUP |
| iSheet link | SHEET_COLUMN_TYPE_ISHEET_LINK |
| Hyperlink | SHEET_COLUMN_TYPE_HYPERLINK |
| Attachment | SHEET_COLUMN_TYPE_ATTACHMENT |
| Document link | SHEET_COLUMN_TYPE_DOCUMENT_LINK |
| Folder link | SHEET_COLUMN_TYPE_FOLDER_LINK |
Note:
A sample for Normal iSheet
<isheetview> <viewid>100</viewid> <title>iSheet view 1</title> <markasdefault>1</markasdefault> <emailview>0</emailview> <columns> <column> <columnid>20</columnid> <type>5</type> <name>Custom column 1</name> <section>17</section> </column> </columns></isheetview>
A sample for Task custom metadata iSheet (TMD) (applicable from Collaborate 5.0)
<isheetview> <viewid>100</viewid> <title>iSheet view 1</title> <markasdefault>1</markasdefault> <emailview>0</emailview> <columns> <column> <columnid>20</columnid> <type>5</type> <name>Custom column 1</name> <section>17</section> <columntype>ISHEET_CUSTOM</columntype> </column> <column> <columnid>5</columnid> <type>0</type> <name>Status</name> <columntype>TASK_STANDARD</columntype> </column> </columns></isheetview>
Note :
1. If iSheet is not TMD - No need to defined '<columntype>' in request xml.
2. If iSheet id TMD, then '<columntype>' is mandatory for every column.
3. for 'columntype = TASK_STANDARD'.. no section id will be there. because of those columns are not iSheet's custom columns.
Hi Ryan D'Souza - this has now been updated. I'll try to look out for this when I do any reviews going forward.
Thank you Ryan D'Souza, I have logged this one as well with our developer. I'll come back to you with an update as soon as I get a response.
typo found, should be "" on the bottom not "
Comments
3 Comments