1. regme_rojo
  2. RO CSVI
  3. Friday, 17 June 2022
  4.  Subscribe via email
I finally managed to create a perfect import template for my contacts xml file.
However: the customer provides the xml file with some empty entries. I don't know why, but I can't change how the file is provided.
The import template therefor creates empty entries.

What can I do to prevent those empty entries?

Thanks!
Chris
Accepted Answer
Accepted Answer Pending Moderation
Hello,
Thank you for posting the requested files. I was able to reproduce the 500 error with your template and import file. Your template did not have the Skip rule set so the 500 error is not because of the Skip rule. The 500 error was because of empty category ID which is fixed with the attached patch file. Please load the attached patch file and run the import. Check if the 500 error is gone.

May I know on which fields you applied the Skip rule? I will check the rule for skipping the empty entries.
Attachments (1)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # Permalink
Accepted Answer Pending Moderation
Hello Chris,
You can use RO CSVI Skip rule plugin to skip the empty entries on import. You can apply this rule on a field which has empty value so entire row is skipped on import.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hi!
I tried to use the skip rule plugin, but it creates and 500 server error.
So this is my simple rule:
skip01.png
I added it to the a custom field which is in the XML file.
After that the import template does not work anymore.
I also tried to add it as a general rule to the import template. Same effect.
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Additional note: If I add it as general rule but without assigning a field to it, nothing happens: no 500 Error, but also no filtering of empty records.
Here's an example of an empty entry of the XML:

<LSRMitarb>
<LSR_ID></LSR_ID>
<LSR_AMTSTITEL></LSR_AMTSTITEL>
<LSR_TITEL></LSR_TITEL>
<LSR_NAME></LSR_NAME>
<LSR_NGTITEL></LSR_NGTITEL>
<LSR_DEF_ORG></LSR_DEF_ORG>
<LSR_VORNAME></LSR_VORNAME>
<LSR_EMAIL></LSR_EMAIL>
<LSR_TEL1></LSR_TEL1>
<LSR_TEL2></LSR_TEL2>
<LSR_FAX></LSR_FAX>
<LSR_ABT></LSR_ABT>
<LSR_ZIMMER></LSR_ZIMMER>
</LSRMitarb>

So there is literally nothing in it
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hello,
Please post the template XML and sample of import file to check. To get the template XML file, in RO CSVI maintenance menu select RO CSVI on first option, backup templates on second option, select the import template and download the XML file. Post the XML file.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Attached you find the files.
Thanks a lot!
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation

May I know on which fields you applied the Skip rule? I will check the rule for skipping the empty entries.


I tried it on several fields: LSR_ID, name, LSR_ABT
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
OK, no 500 anymore
plus: If I add a general skip rule to the Joomla! custom field "lsr-id" the system works and skips empty entries.
Thanks a lot for your help!

It's not really intuitive that one needs to apply a "skip on empty" rule to an "internal" Joomla! field. I thought I needed to apply it to the "external" LSR_ID field in the file. I supposed the software would look at the "external" field (in the file) first and then decide not to import the whole entry. Anyway. Works now thanks to your help!
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Hello,

It's not really intuitive that one needs to apply a "skip on empty" rule to an "internal" Joomla! field.
I would like to answer this. This confusion is logical in the way you represent the process however the process in RO CSVI is a little different. The import file gets read and the internal fields get filled with the data from the import file, after that the rules are applied to the internal fields. The reason why this works this way is because you have a multitude of rules on your fields, so the eventual value in the internal field may be different at the moment the skip rule comes by due to something done in another rule that ran before the skip rule.

In an example, you could have a skip rule if the value of a field is ABC. Now you import your data and the data in your import file is ABC-DEF. You have a replacement rule in place that removes -DEF from the field value, the new value is ABC. As last the skip rule comes by and finds the value ABC and will skip that record. This would be impossible if we skip based on what is in the import file and allows for more flexibility of massaging your data.

Hope that clears things up.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Thank you, now it's even more clear to me.
I discovered also, that the rules are processed in their given order in the component. Man, got some gray hair, until I understood this!

P.S. "massaging data" is a funny way to say this
  1. more than a month ago
  2. RO CSVI
  3. # 9
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!