Multi-picklist using a list of element "errorCode": 5536

06/10/21
Accepted

I'm trying to implement a multi_picklist with a list of elements, the following code works with one element but fail with a second one, so I think the structure is good, but the format of my list maybe wrong or I'm missing something


def listToString(s):

str1 = ""

    for e in s:

        str1 += e

        print(str1)

        return str1

new_cell_add = smart.models.Cell()

new_row_add.cells.append({'column_id': ######, 'object_value': {'objectType': 'MULTI_PICKLIST', 'values': listToString(my list)}, 'strict': True})

I'm getting the error:

{"result": {"code": 5536, "errorCode": 5536, "message": "The value \"c[email protected]24f40bb\" could not be saved in column 

Any ideas ?

Best Answer

  • Accepted Answer

    I found the answer to this question,

    1. Call the sheet as level two and make sure the object details are included in the get
    2. The MULTI-PICK column it cannot be locked, or you will get the same error
    3. The list of objects has to be added to the element, it cannot be a list and then convert it as the API doesn't like it
    4. my loop in the function displayed above had an extra indentation in the return line

    I hope this help others,

Answers

  • Accepted Answer

    I found the answer to this question,

    1. Call the sheet as level two and make sure the object details are included in the get
    2. The MULTI-PICK column it cannot be locked, or you will get the same error
    3. The list of objects has to be added to the element, it cannot be a list and then convert it as the API doesn't like it
    4. my loop in the function displayed above had an extra indentation in the return line

    I hope this help others,

Sign In or Register to comment.