This appears to be caused by the way VI handles item code descriptions, which behaves differently then if you were to modify the extended description in Item Maintenance.
Item Maintenance appears to trim the standard item code description to either before the first occurrence of a carriage return or to 30 characters.
VI only trims the standard item code description to 30 characters.
This can be worked around with either perform logic on the before write and after write of the item code description or by appending additional statements to the field calculated statement as seen in the following screenshots.
{CI_Item.ItemCodeDesc$}; IF LEN(IMP$[2])>30 OR POS("^"=IMP$[2])>0 THEN coBusiness'ExtDescriptionText$=SUB(IMP$[2],"^",$0D$) END_IF------------------------------
David Speck II
Tennessee Software Solutions
------------------------------
Original Message:
Sent: 11-04-2019 16:41
From: Therese Logeais
Subject: VI to import IM extended descriptions without replacing the regular descriptions
If you go into the extended description and make any sort of change and click OK, the regular description is then correct. There are 120+ items and I don't really feel like go into each extended description to correct them.
Oddly enough, when I tried importing just the regular descriptions, it worked for some items but not for others i.e. some reg. desc's held and the ext'd was the same but for others, the ext'd desc. disappeared. I'm thinking for items with reg. desc's <30, they disappeared?
------------------------------
Therese Logeais, Technology Integrators
------------------------------
Original Message:
Sent: 11-04-2019 16:37
From: Therese Logeais
Subject: VI to import IM extended descriptions without replacing the regular descriptions
Well @Kevin Moyes your formula now brings it in as "NEUTRAL CLEANER/2X4.5#:N" so it eliminated some of it but not all. And yes, @David Speck II the extended description is perfect, just not the 30 character regular description. And padding didn't do the trick. Any other thoughts??
------------------------------
Therese Logeais, Technology Integrators
Original Message:
Sent: 11-04-2019 16:29
From: David Speck II
Subject: VI to import IM extended descriptions without replacing the regular descriptions
The formula is just replacing all occurrences of the "|" with a Carriage Return (ASCII 13).
It also sounds like the standard description (first 30 characters) will display the first 30 characters inline regardless of special characters within it.
If you click the ext desc button in item maintenance/inquiry, is the full description displayed correctly?
If they absolutely do not want whatever follows the first carriage return to be displayed in the first 30 characters of the standard description, then it sound like you will need to pad anything found before the first carriage return to 30 characters so everything after that goes to the extended description.
Off the top of my head, I do not know whether it will attempt to trim (remove excess spaces) between the valid description and the first carriage return if you were to pad with spaces. I know I have seen it trim just spaces from a field before.
Thanks
David Speck
TSS
Sage | Sage 100 Certified Consultant
Original Message------
Customer uses extended descriptions which include hazardous info, etc. They have the extra info separated by carriage returns, e.g.
"Regular Description
:Class code, etc."
They had to update several items with new class codes and I found a handy KB article about how to import carriage returns with pipe symbols. All looked well until I realized that the regular description now includes the first 30 characters even if there is a pipe symbol separating it.
Here is the source data:
NEUTRAL CLEANER/2x4.5#||:NMF#48580 (CLASS 70)
And here is the imported data:
NEUTRAL CLEANER/2X4.5#:NMG#4
The VI calc is:
sub(Temp001$,"|",$0d$)
What exactly is this formula doing and why isn't it working?? I tried just importing in the regular descriptions but then the extended descriptions are disappearing (not all but some).
HELP!!
------------------------------
Therese Logeais, Technology Integrators
------------------------------