How can I update an existing data entity? Upsert Multiple records is not updating the existing records.

Comments

7 comments

  • Avatar
    Suhail Faisal

    Hi Sancharee,

    In your case, since the data source is an excel file, I assume you might be using Excel Read activity to fetch the records and storing it in some process variable. If my assumption is true then you probably can select "Unique Record Field Value" radio option and you can map it in the request mapping section.

    Hope it solves your concern.

    Regards,
    Suhail Faisal

    0
    Comment actions Permalink
  • Avatar
    Sancharee Dey

    Hi Suhail,

    Thank you for responding. But I do not see an option to select the "Unique records field value" in upsert records activity. I am using Agile point v7.0.

    This is the mapping I have done: (not sure how Agile point identifies which record I am mapping it with because I do not know the record id when I am using upsert)

    Here is a better understanding of what I am trying to achieve:

    1. Read an with Employee name and details from an excel into a process variable. (Read Excel table)

    2. Update this excel data from process variable to custom entity. The custom entity has the same columns as the excel file. (upsert multiple records). 

    My requirement is to update the custom entity every time the excel is updated. But every time I run the upsert multiple records on the same custom entity, duplicate records are getting created without updating the existing records. Can you please tell me how can I update the entity with the latest excel data without creating duplicates?  

    0
    Comment actions Permalink
  • Avatar
    Suhail Faisal

    Hi Sancharee,

    The option to select the "Record ID" or "Unique records field value" will be available in v8.0+

    You either have to upgrade your environment or you can follow the below method:

    1) Have a column with the name Record ID in your excel file.

    2) Update the excel with the Record IDs, you can get it from the URL when you click on View/Edit the record from the Data Entity screen.

    3) Map the ID node with the process variable which holds the Record ID.

    4) Publish the App, When the process is triggered, it will update the records matching with the Record ID else it will add a new record.

    I Hope this solves your problem.

    Regards,
    Suhail Faisal

    0
    Comment actions Permalink
  • Avatar
    Sancharee Dey

    Hi Suhail,

    Thank you for your quick response.

    I could see the record id now on the url as your suggested. But there are 2 issues if I choose to proceed in this path:

    1. I have 250+ records in my data entity. If I have to update all the record ids by manually checking the url on the data entity screen it is going to be a tedious task.

    2. The user might add more line items in the excel when they update it. In that case the process will again fail if we miss to manually update the record id. This will be a scheduled process that will run every 30 minutes to keep they data entity and excel in sync.

    0
    Comment actions Permalink
  • Avatar
    Sancharee Dey

    I also tried to delete all records from data entity and then use upsert activity to do a fresh upload every time.  First I am querying all the existing records in the data entity and saving the record id in a process variable. Now I loop through that process variable and pass the record id in the delete record activity. But it is not working. Given below are my obsercations:

    1. Process is getting suspended after the 50th iteration. I checked the data from the process monitor. Given below is a screenshot of the process model.

     

    2. The delete record is not deleting any items from the data entity. I have sent emails to myself with the looping variables in the content to see the record id being captured. I can see the record ids being captured successfully in the process variable which I am looping through. Sharing screenshots from my email:

    I am passing the same variable in delete records activity as the record id parameter.

    Please share your thoughts on this.

     

    0
    Comment actions Permalink
  • Avatar
    Suhail Faisal

    For your 1st concern, please have a look at the below resources.

    https://documentation.agilepoint.com/10/admin/serverConfigMaxLoop.html

    https://documentation.agilepoint.com/00/appbuilder/cloudenvPropertiesMaxSessionAllowedConfigWin.html 

    For your 2nd concern, Please contact AgilePoint support team. Deleting the record using Record ID worked for me

    Thanks,
    Suhail Faisal

    0
    Comment actions Permalink
  • Avatar
    Sancharee Dey

    Can you tell me from where can I raise a ticket directly to the Agile point support team?

    0
    Comment actions Permalink

Please sign in to leave a comment.