Need help in using add list item activity for sharepoint list with UiPath

I am trying to add the data to the list using MS Office 365 activities but it is giving an error that the field value can not be found or is not writeable. Did anyone face this issue, for not adding the data to the SP list ?? Any suggestions.

@divya.gupta1

Welcome to the community

Can you show what and how you configured

also are you adding multiple or single item at a time? based on that the datatable structure also differs

as per error there is a column may be which will auto increment or so and you added data to that

cheers

Hi Anil,

I am adding the data to the single item and the column to which I am adding the data is of “text” type and it not getting auto incremented

@divya.gupta1

So did you construct the datatbale to contain two columns? one for columnnname and one for value?

Also the name used should be the DISPLAY NAME

cheers

Hi Anil,

Yes I have created the datatable and I have tried using both the names (Display names) and (Backend Names) of the columns. Still receiving the same error.

However, while debugging I found one solution that the Display name should match the backend name of the columns then the activity “Add list item” is working fine. So could you please confirm if it is a limitation of the activity or is there any other way to resolve the issue.

Thanks

@divya.gupta1

Try this:

When you encounter the error “the field value cannot be found or is not writable” while trying to add data to a SharePoint list using UiPath’s MS Office 365 activities, it typically indicates issues related to field mapping, permissions, or the status of your SharePoint list. Here are several suggestions to troubleshoot and potentially resolve the issue:

Suggestions for Resolving the Issue

  1. Ensure Correct Field Names:

    • Make sure that the field names you are using in your UiPath activities match exactly with those in the SharePoint list. Field names are case-sensitive. If you are using display names, confirm those are the correct ones.
  2. Check Required Fields:

    • Ensure that all required fields in your SharePoint list are being provided values in the UiPath activity. If a required field is missing, it may cause this error.
  3. Field Types Compatibility:

    • Confirm that the data types of the values you are sending to SharePoint fields are compatible with the field types in the list. For example, you should not send a text string to a Date or Integer field.
  4. Use Add List Item Activity:

    • Ensure you are using the Add List Item activity within the Office 365 Scope and that you’ve properly configured it with the correct list name and item properties.
  5. Permissions Check:

    • Ensure that your account has sufficient permissions to add items to the SharePoint list. You can verify your permission levels within SharePoint.
  6. Access the Correct Site URL:

    • Double-check that you are targeting the correct SharePoint site and list. An incorrect URL might point you to the wrong location where the specified fields do not exist.
  7. Check for Unique Fields:

    • If your list contains fields that require unique values (e.g., ‘Title’), ensure you’re providing a unique entry that doesn’t already exist in the list.
  8. Error Handling:

    • Implement error handling in your UiPath workflow using Try-Catch blocks to better capture and understand any exceptions that may arise during execution.
  9. Use Logging:

    • Add logging activities to output the values and field names being sent to SharePoint. This may help identify any discrepancies.
  10. Check SharePoint List Status:

    • Ensure the SharePoint list you’re trying to update isn’t in a read-only state or locked for editing.

Example Setup of Add List Item Activity

If you are using the Add List Item activity, ensure your properties are like this:

  • Site URL: The URL of your SharePoint site.
  • List Name: The name of your list.
  • Item: A dictionary where the key is the field name, and the value is the data you want to insert.
Item.Add("FieldName1", value1)
Item.Add("FieldName2", value2)
...

Troubleshooting Steps

  1. Run the workflow after making the changes.
  2. If the problem persists, consider testing with a minimal dataset, only including required fields.
  3. Review any SharePoint error logs if available for more insight.

I

HI Naveen,

Yes I am performing all the steps as mentioned, I have also tried using both the names (Display names) and (Backend Names) of the columns. Still receiving the same error.

However, while debugging I found one solution that the Display name should match the backend name of the columns then the activity “Add list item” is working fine. So could you please confirm if it is a limitation of the activity or is there any other way to resolve the issue.

Thanks