I took over EDI from a guy who set everything up and left no documentation as to what he did or even what language that he was using.
Normally our customers send a bill to code at the N1.04 level but they only send the qualifier and name at N1.01 & .02.
I have made the change where its pulling over the name but the field length isn't long enough for me to map it in our system.
They send Customer Name - Florida or Customer Name - Georgia but i only have enough room for Customer Name - Geor and figure that is enough where if I can truncate it and only pull as many characters that I need then I can map it to our customer code and have that fill in.
When I have tried to ChatGPT or CoPilot it tells me that it looks like the programming language "R" but I cannot be certain. Is there a way to truncate what they are sending if its too long?
I don't even know what language this is and am not a coder. I just don't want to have to pay a 3rd party $300/hr to look at it for 4 hours of time.
They don't always send over the same customer so I'm trying to grab whatever they send but if its over 20 characters just grab the 20 and let me map that.
I added line 2 and 3 but trying to figure out how to truncate N1.02 to 20 letters and then use that to map to customer_id.
Im not even sure that I need line 2.
N102 <- CUR_DE;
edi_order$customer_ediloc <- CUR_DE;
if (N101 == "BT") edi_order$customer_id <- CUR_DE;
This is what I was I tried and didn't work
truncated_CUR_DE <- substr(CUR_DE, 1, 20);
N102 <- truncated_CUR_DE;
edi_order$customer_ediloc <- truncated_CUR_DE;
if (N101 == "BT") {
edi_order$customer_id <- truncated_CUR_DE
};