Joined: 05 Feb 2010
Online Status: Offline
Posts: 7
Topic: Combining string fields with duplicated data Posted: 17 Aug 2010 at 6:34am
Hello,
I am trying to combine the detail of a particular field on one line using the Ken Hamady formula found here, http://www.kenhamady.com/form16.shtml, for appending a list of detail on one line.
The formula works great but unfortunately the data in my tables is bad and gives me two or more details with the same string for each unique detail. I am trying to remove the duplicated string so that the formula will only show unique details separated by commas. Here is the formula and an example of what the data then looks like:
WhilePrintingRecords; StringVar Item:= {OrderItemsAttributes.AttributeDetailName}; // place your field in place of {Your.Field} StringVar Chain; NumberVar ChCnt;
if ChCnt = 1 then (ChCnt:= 2; chain := Item) else if Length(Chain) + Length(Item) > 254 //see note about this number below then Chain := Chain else chain := chain + ', ' + Item
Unfortunately, I can't access or fix the database that I am getting this info from. It will become obsolete for us in a few months so the company is not willing to try and to fix the data.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum