Welcome Guest! To enable all features please Login or Register.
Go to last post Go to first unread
#1 Posted : Monday, December 19, 2016 2:33:05 PM(UTC)
Rank: Advanced Member

Groups: extranet\Forum
Joined: 8/19/2014(UTC)
Posts: 109

In data modeler I have imported a crosstab as datasource an it has item description, quantity, price etc. as columns. In the "create format" in my data source in data modeler I want to add a new column which extracts or deletes a certain part of my "item description" column.

For example I want to remove the word "product" from all entries in the "item description" column. The word is always at the start of the description, so it's safe to remove the first 8 characters of the item description. The best/safest way would be to remove the word "product" and not the first 8 characters if that's possible.

I found the "replace" formula in data modeler, but didn't get it to work.


There is also a regexreplace() formula which maybe can do the job.

Can it be done?

Edited by user Monday, December 19, 2016 2:44:33 PM(UTC)  | Reason: Not specified

#2 Posted : Monday, December 19, 2016 5:49:13 PM(UTC)
Rank: Administration

Groups: extranet\Forum
Joined: 4/7/2011(UTC)
Posts: 514

From the TARGIT University course TARGIT Data Discoverer there is an example on how to work with data fields, including how to remove preceding texts from text strings.

In your case, you should try something like this:

if(left(&ItemDescription,8)="Product ", right(&ItemDesription, len(&ItemDescription)-8), &ItemDescription)

Best regards,
Ole Dyring
Users browsing this topic
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.



We use cookies to improve your site experience, but they also provide us with information on your use of our website.
To find out more about the cookies we use and how to delete them, see our Privacy Policy. By continuing to browse the site, you are consenting to our use of cookies.