Combine condition with value
MikeCrutchfield opened this issue · comments
MikeCrutchfield commented
I am trying to do something like this, but can't get the syntax correct. I am trying to fill in the associated property based on the Condition.
Thanks for any help.
[EdiCondition("010", Path = "DTM/0"), EdiValue(Path = "DTM/1", Format = "yyyyMMdd", Description = "DTM02 - Date format = CCYYMMDD")]
public DateTime RequestedShipDate { get; set; }
[EdiCondition("038", Path = "DTM/0"), EdiValue(Path = "DTM/1", Format = "yyyyMMdd", Description = "DTM02 - Date format = CCYYMMDD")]
public DateTime ShipNoLaterDate { get; set; }
I get nulls for the properties with the above syntax
The incoming segment is like this:
DTM*010*20230204~
DTM*038*20230206~
Constantinos Leftheris commented
Unfortunately Conditions do not work directly on values (components). You will have to make a wrapper class for the DTM in order for this to work. Check a sample here
MikeCrutchfield commented
Thanks!