Comments (3)
Hi @AlittleBird2023 and thanks for your interest in EDI.Net.
The path is interpreted contextually. This means that when paired with an EdiElement
attribute it is interpreted as one level path and on an EdiValue attribute it is always treated as a two level path (element index, component index). That said, when the zero index is omitted it is considered implied so in an EdiValue
Check these examples for the EdiValue
DTM
==DTM/0
==DTM/0/0
DTM/1
==DTM/1/0
Accordingly for an Element
DTM
==DTM/0
Hope this helps.
C.
from edi.net.
Thanks @cleftheris for your quick reponse!
So, in the following example:
[EdiSegment, EdiSegmentGroup("PO1", SequenceEnd = "CTT")] public class OrderDetail { ... [EdiCondition("018", Path = "DTM/0/0")] public DTM AvailableFromDate { get; set; } [EdiCondition("067", Path = "DTM/0/0")] public DTM ArrivalDate { get; set; } [EdiCondition("002", Path = "DTM/0/0")] public DTM DeliveryRequestedDate { get; set; } [EdiCondition("038", Path = "DTM/0/0")] public DTM ShipNoLaterDate { get; set; } ... } [EdiSegment, EdiPath("DTM")] public class DTM { [EdiValue(Path = "DTM/0", Description = "DTM01 - Date/Time Qualifier")] public string DateTimeQualifier { get; set; } [EdiValue("9(8)", Path = "DTM/1", Format = "yyyyMMdd", Description = "DTM02 - Date format =CCYYMMDD")] public DateTime Date { get; set; } }
The condition path "DTM/0/0" in class OrderDetail can be rewritten to "DTM/0" because there are no components in element DateTimeQualifier, right?
from edi.net.
There are always components involved on the value level.
For example the following line represents a DTM segment with one element and inside of that one component
DTM+137
While this has one element and 3 components.
DTM+137:20060619165058:203
The component it there regardless of the delimiter.
For the condition attribute always express the full path for the value - don't use the short versions.
A side note do prefer the explicit EdiSegmentGroup declaration over the SequenceEnd. The former is the one that you have to declare all direct desendant segment names while the latter will only get you so far on simple usecases. Checkout examples in the tests project
from edi.net.
Related Issues (20)
- X12 - automatic detection of grammar
- Set font when use EdiSerializer().Deserialize
- X12 - Segment ISA - Component element separator HOT 2
- X12 - Reuse data segment code (example: N1 Loop Party Identification) HOT 1
- X12 - N1 Loop PartyIdentification for EDI 940 HOT 1
- Parser cannot process escaped plus sign for phone number in PartyMutuallyDefined NAD record HOT 1
- Two segment groups with the same path HOT 1
- Repeating element groups within segment for X12 830 HOT 1
- Repeated elements in a segment
- Picture with implicit V9 on decimal? still adds a decimal separator HOT 4
- [Q] Error was thrown for repeated segment groups HOT 3
- EdiCondition not working to RFF+CR HOT 1
- .net8 HOT 1
- Help understanding EdiSegment Path settings HOT 3
- Some Segments does not map properly
- List wih repeating elements HOT 4
- Enum deserialization does not work
- X12 270/271 Eligibility Benefit Inquiry
- TradaComs26v3 file Charge lines contain `=` sign in TCOD TariffDescription HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edi.net.