Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Brandon Hop
5
Views
5
Comments
AE.2. Implement the Logic to Import Data
Question
Training
Hi everyone!
So I finally made it to the second extra exercise. Now I have to implement my logic for the upload of the excel file. But I've got a problem....
I can't seem to check if a record from the excel file is already in the existing data, so now when I upload a new file it just adds it to the rest and it will create a duplicate. Completely ignoring my checkbox as well! I wonder what I'm doing wrong, if you are kind enough to help me out: check the attachments for my application. Inlcuding some test excel files, one of which has new records and an existing one (called: Cram).
Kind regards, Brandon
Test_Excel_SoftwareComputers.zip
Paulo Ramos
Staff
Hi Brandon,
Sorry for the late reply. As you wrote, you have to check if the record already exists in the database. For this, add an Aggregate to the loop (inside the Import action). Your aggregate should search for an existing Software having the same name as the current excel row.
Hope this points you in the right direction, but feel free to ask further questions.
1 reply
27 Oct 2015
Show thread
Hide thread
Brandon Hop
Paulo Ramos
wrote:
Hi Brandon,
Sorry for the late reply. As you wrote, you have to check if the record already exists in the database. For this, add an Aggregate to the loop (inside the Import action). Your aggregate should search for an existing Software having the same name as the current excel row.
Hope this points you in the right direction, but feel free to ask further questions.
I just tried it and it worked, thanks for the help! After that I had the issue that it added the records which were new, even though there were records which were already existing (overwrite not selected). To solve this I added the records to a list first and if there was a record already existing it ended the flow. When it continued the flow another ForEach took care of the list and adds or updates them.
Thank you for your help once again!
Brandon Hop
Hi Paulo, I wasn't expecting a quick reply since the course was already closed, so I'm glad I still got one. Thank you for your suggestion, I will try it immediately!
Mart Potter
for every other assignement there is a solution in the end for download, where is solution for AE.2?
Miguel Seabra Melo
Hi Mart,
It's a fair point... we don't seem to have one. :( We'll try and knock together one to put it up for download by the end of the week.
Thanks for the heads up,
Miguel
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...