Search Results for

    Show / Hide Table of Contents

    Method UserTableGetRecordsWithSelectedColumns

    UserTableGetRecordsWithSelectedColumns(String, String, Int32, Boolean, List<SelectedColumnContract>, Boolean, List<WhereClauseElementContract>, List<OrderByClauseElementContract>, Boolean)

    Gets some rows from a user table

    Declaration
    List<List<string>> UserTableGetRecordsWithSelectedColumns(string connectionId, string userTable, int maxRecords, bool isDistinct, List<SelectedColumnContract> selectedColumns, bool addColumnNames, List<WhereClauseElementContract> whereClauseElements, List<OrderByClauseElementContract> orderByClauseElements, bool addColumnHeaders)
    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.Int32 maxRecords

    Max records returned from user table

    System.Boolean isDistinct

    Distinct rows returned from user table

    System.Collections.Generic.List<SelectedColumnContract> selectedColumns

    Selected columns with alias returned from user table

    System.Boolean addColumnNames

    Adds column aliases instead of column name

    System.Collections.Generic.List<WhereClauseElementContract> whereClauseElements

    Optional: A list of SQL where clause elements. Column names will be used for this action. Can be null. See also WhereClauseElementContract

    System.Collections.Generic.List<OrderByClauseElementContract> orderByClauseElements

    Optional: A list of SQL order by clause elements. Column names will be used for this action. Can be null. See also OrderByClauseElementContract

    System.Boolean addColumnHeaders

    Adds column headers as first row

    Returns
    Type Description
    System.Collections.Generic.List<System.Collections.Generic.List<System.String>>

    Some rows and columns from a user table

    Examples

    POST https://YourServerName/InfoShare/Json/UserTable/UserTableGetRecordsWithSelectedColumns

    This example gets specific columns, their rows and the column headers from a user table filtered by a where clause.

        {
       "connectionId": "e08bfe6a-e89a-4f89-92e8-949a43709ef5",
       "userTable": "Test",
       "whereClause": "",
       "whereClauseElements": [
           {
               "ColumnName": "Spalte 3",
               "RelationalOperator": "Equals",
               "Value": "S 1.3",
    
               "LogicalOperator": ""
           }
       ],
       "addColumnHeaders": false,
       "maxRecords": 2,
       "isDistinct": false,
       "addColumnNames": false,
       "selectedColumns": [
           {
               "ColumnName": "Spalte 2",
               "Alias" : "Kapitelnr"
           }
       ]
    }

    Response:

    {
      "UserTableGetRecordsWithSelectedColumnsResult": [
           [
               "S 1.2"
           ]
       ]
    }
    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 whereClauseElements[{whereClauseIndex}].RelationalOperator is invalid: Could not parse string '{relationalOperatorStr}' to a valid relational operator. Valid relational operators are: {allowedRelationalOperators} (10191)

    ServiceException

    Parameter whereClauseElements[{whereClauseIndex}].LogicalOperator is invalid: Could not parse string '{logicalOperatorStr}' to a valid logical operator. Valid logical operators are: {allowedLogicalOperators} (10192)

    ServiceException

    Parameter orderByClauseElements[{orderByClauseIndex}].SortOrder is invalid: Could not parse string '{sortOrder}' to a valid column sort order. Valid sort orders are: {allowedColumnSortOrders} (10193)

    ServiceException

    Parameter whereClauseElements[{i}].ColumnName is missing (10194)

    ServiceException

    Parameter whereClauseElements[{i}].RelationalOperator is missing (10195)

    ServiceException

    Parameter whereClauseElements[{i}].LogicalOperator is missing (10196)

    ServiceException

    Parameter whereClauseElements[{i}].Value cannot be null. Value can only be null, if whereClauseElements[{i}].RelationalOperator is {RelationalOperator.Equals} or {RelationalOperator.NotEquals} (10197)

    ServiceException

    Parameter whereClauseElements[{i}].LogicalOperator is superfluous because no condition follows (10198)

    ServiceException

    Parameter whereClauseElements[{whereClauseIndex}].EscapeCharacter is invalid: Could not parse string '{escapeCharacterStr}' to a valid escape character. Valid escape character is: {allowedEscapeCharacter} (10199)

    ServiceException

    Parameter whereClauseElements[{i}].EscapeCharacter is not allowed because the relational operator is neither {RelationalOperator.Like} nor {RelationalOperator.NotLike} (10200)

    ServiceException

    Table name '{userTable}' does not exist (10219)

    ServiceException

    Not enough rights ({accessOperationName}, {accessOperationId}) (10071)

    Back to top Copyright © Kendox