Skip to main content
January 20, 2023
Question

Write Records Smart Service "same identifier" Error

  • January 20, 2023
  • 4 replies
  • 0 views

I am using the Write Records smart service in a process model to take the results of a stored procedure (using the Execute Stored Procedure smart service) and update a record and the source table. When I run the process model I get the error "The input "Records" cannot contain multiple records of the same type with the same identifier".

In a separate expression rule I have called the same stored procedure, tested the data and verified that there are no duplicate ids created by the expression in the id field.

Can anyone tell me why Appian is giving me this error? I have attached the contents of the Records input field in the Write Records smart service. 

pv!equipDataModified is a list of map with fields "equipNum", "serviceDays", and "serviceDaysPast"

Thanks in advance!

    4 replies

    konduruc733182
    January 20, 2023

    Hello [mention:47dacd2963234394a665cd71b6c9f125:e9ed411860ed4f2ba0265705b8793d05]

    Can you please share the error message ss.

    jackf0001Author
    January 20, 2023

    The error message I am getting is:

    "The input "Records" cannot contain multiple records of the same type with the same identifier"

    konduruc733182
    January 20, 2023

    Is your SH TrackingDataMTFB.id primarykey?

    if yes may be there is some combination that is overlapping.

    lets say you have id custId=11 and locId=1, returns as 111

    when you are having custId=1 and locId=11, returns as 111

    It will consider as a duplicate value. But first what is the type of these two ID's? are they just numbers or do you have any text?

    If it is not an auto increment, then the error might be because you have duplicate entries which share the same primary key value.

    February 6, 2023

    Steps to fix-

    Step 1: See the affected products
    Step 2: Provide the correct identifier and consistent attributes
    Step 3: Resubmit your product data

    Regards,

    Rachel Gomez