最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

DIXF – {CR}{LF} vs {LF}

网络文摘 William 3632浏览 0评论

A client was doing an DIXF Import for a Purchase Order Line entity and kept getting this error.

“The field “VendGroup” is not present in source”

image

INVESTIGATION:

This happened when i tried to preview data or to promote data from csv to staging. What happened was the DIXF framework stores header of csv file to a container and validates these header fields against source that user already defined during mapping.

Container[25] = “VendGroup”
Entity Field.FeldName = “VendGroup”

These 2 should be equal; however, it failed

image

I was thinking there should be a special character that is coming from the csv file which regular text editor can’t see. i used Notepad++ to verify the header and there is {CR}{LF} right behind “VendGroup”

image

{CR} Carriage Return;  {LF} Line feed

SOLUTION

I started looking at “Source data format” of the entity and realized it was using “{LF}” as row delimiter. That explained why the method confind could not match the string because of special character {CR}

Container[25] = “VendGroup{CR}”
Entity Field.FeldName = “VendGroup”

image

Changing row delimiter from {LF} to {CR}{LF} fixed my problem.

转载请注明:ww12345678 的部落格 | AX Helper » DIXF – {CR}{LF} vs {LF}

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址