Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bex 444 posts 555 karma points
    Jul 19, 2016 @ 09:48
    Bex
    0

    Deleting records functionality

    Hi

    I just want to check how the delete records should work? I have a structure as follows:

    --Areas

    ------Area1

    ------------Site1

    ------------Site2

    ------Area2

    ------------Site1

    ------------Site2

    I import sites to my website every month, each area is a different sheet in my excel, so I import one area at a time.

    I assumed (possibly wrongly) that if I told it to import sites in area 1, updating existing ones, adding new ones and deleting ones not in the excel that it would only do this for Area 1

    Instead it started deleting all the sites out of all my areas.

    Is this correct? If so, is there a way round it so I don't have to manually go in and delete everything first?

    Thanks

    Bex

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Jul 20, 2016 @ 06:15
    Richard Soeteman
    0

    Hi Bex,

    This is indeed intended behavior since it deletes all data from the import definition with the same datasourcerelation key in cmsimportrelation table that is not in the current uploaded file.

    The datasource relation is based on dataprovider alias and selected primary key name. What you can do is make the primary key name unique for each area so instead of just id make it area1Id, area2Id etc then it should work per area.

    Hope this helps,

    Richard

  • Bex 444 posts 555 karma points
    Jul 20, 2016 @ 08:07
    Bex
    0

    Thanks for explaining. I assumed it must be something like that but I didn't really understand. I shall update my primary keys and try that out.

Please Sign in or register to post replies

Write your reply to:

Draft