Method UserTableImportData
UserTableImportData(String, String, List<List<String>>, Boolean, Boolean)
Imports rows into a user table
Declaration
void UserTableImportData(string connectionId, string userTable, List<List<string>> values, bool deleteAllValues, bool firstRowContainsColumnHeaders)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionId | The connection id to identify your connection. See also ConnectionId |
System.String | userTable | Name of the user table |
System.Collections.Generic.List<System.Collections.Generic.List<System.String>> | values | List of row and column values to insert |
System.Boolean | deleteAllValues | Defines whether to delete all values. Default: false |
System.Boolean | firstRowContainsColumnHeaders | Defines whether the first row of the |
Remarks
- If "addAutoIncrementColumn" in UserTableCreateTable() is true, the user table is created with a primary key identity column named "ID" at the first ordinal position.
Examples
POST https://YourServerName/InfoShare/Json/UserTable/UserTableImportData
This example imports two rows into a user table after deleting all existing rows.{
"connectionId": "936b443f-dbd9-4bbf-ba03-208567d6ccb7",
"userTable": "UserTable_Test1",
"values": [
[ "row1_col1", "row1_col2", "row1_col3", null ] ,
[ "row2_col1", "row2_col2", "", "row2_col4" ]
],
"deleteAllValues": true,
"firstRowContainsColumnHeaders": false
}
{}
Exceptions
Type | Condition |
---|---|
ServiceException | The connection id {connectionId} isn't valid or has expired (10008) |
ServiceException | Verification code is needed: Verification code not yet verified (10152) |
ServiceException | Table name '{userTable}' is invalid. Allowed characters are: {allowedCharacters} (10184) |
ServiceException | Parameter values [0] contains no column headers (10213) |
ServiceException | Parameter values [0] contains duplicate column header '{duplicateKeys[0]}' (10214) |
ServiceException | Column value too long (10216) |
ServiceException | Parameter values [0] contains an invalid column header (10217) |
ServiceException | Table name '{userTable}' does not exist (10219) |
ServiceException | Parameter values [0] contains not enough column headers [{0}]. {1} column header(s) is/are required (10237) |
ServiceException | Not enough rights ({accessOperationName}, {accessOperationId}) (10071) |