Kentico Import tool kit | where contion to match existing pages while importing

Vinodkumar Vutla asked on May 4, 2020 09:05

I am importing an excel sheet of source data using Kentico 12 Import Tool Kit. I am wondering how can I write a where condition so on subsequent imports existing pages gets updated.

Please see the image of clolumn mappings:

http://prntscr.com/sailjv

For instance I have tried this and it doesn't work BusinessServiceName={%BusinessServiceName%} Can you please hemp me?

Recent Answers


Arjan van Hugten answered on May 4, 2020 09:20 (last edited on May 4, 2020 09:24)

Hi,

Your expression is almost correct. You need to include quotes around the field and also make sure you have the correct option checked in step 2 of the wizard (import new and overwrite existing pages or skip existing pages).

This should work:

BusinessServiceName='{%BusinessServiceName%}'

1 votesVote for this answer Mark as a Correct answer

Vinodkumar Vutla answered on May 4, 2020 09:28 (last edited on May 4, 2020 09:28)

Hi Arjan

I am sorry I have forgot to update the question, I mean I have tried that too (BusinessServiceName='{%BusinessServiceName%}'), with step 2 of the wizard(import new and overwrite existing pages or skip existing pages)

It doesn't work

0 votesVote for this answer Mark as a Correct answer

Arjan van Hugten answered on May 4, 2020 09:41 (last edited on May 4, 2020 10:02)

I am testing it on my instance and 'import new and overwrite existing pages' is not working for me. The 'skip existing pages' option is working for me.

0 votesVote for this answer Mark as a Correct answer

Dmitry Bastron answered on May 4, 2020 09:51

Hi Vinodkumar,

Here are couple more things to check:

  • Have you checked parent NodeID if it is correct? Have you tried parent NodeAliasPath instead? I typically use it, i.e. /parent/node/alias/path
  • Is it single or multi-culture website? What is your DocumentCulture mapping in this configuration? Does this culture version exist for these documents?
  • And for sure the condition should be in quotes: BusinessServiceName='{%BusinessServiceName%}'
0 votesVote for this answer Mark as a Correct answer

Vinodkumar Vutla answered on May 4, 2020 10:51 (last edited on May 4, 2020 10:52)

Hi Guys,

Yes I have a valid Parent Node ID, that's why it import works in the first place

Single culture website, I have assigned the culture to en-au, yes the culture esists

Yes the condition of the macro is inside the quotes

Hey Arjan, Yes the 'skip existing pages' option works for me though

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.