Solved

Remove last 3 characters from a Data Label Value

  • 26 June 2020
  • 6 replies
  • 173 views

Userlevel 3
Badge +16

Hi,

 

Any ideas how to remove the last three characters from a Data Label Value.

 

So if the Value is "TEST #3" how do i remove the "space#3" tag ???

 

or is there a way to look for and remove the String "space#3" as it will always be the same

 

Is there an expression that will do it?

 

Thanks, help appreciated as always

icon

Best answer by tbyrne777 1 July 2020, 17:52

View original

6 replies

Userlevel 5
Badge +13

An expression is the way to go - there are a few built-in Text functions that you will need to use in this expression, "Mid" should get you started. Something like: MID ([your data label], 0, LENGTH([your data label]) - 3)

Hi Sharpharp1,


 


In addition you may checkout the link below for expressions


 


https://help.k2.com/onlinehelp/K2Five/UserGuide/5.3/default.htm#Create/Views/ControlExpressions.htm


 


Hope this helps


 


Should you feel that this post is of use and or an accurate solution to the raised question, I kindly encourage you to mark it as such
using the 'Mark as Solution', 'Kudo' andor ‘Me Too’ options.


 


Cheers,
Kate


 


K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by any forum member.

Userlevel 3
Badge +16
Thanks to you both
Userlevel 3
Badge +16

Hi tbyrne,

 

I tried that expression, but it doesn't work, it just displays the same text as the original data label.

see attachment

 

Any ideas?

Userlevel 5
Badge +13

Please find the attached example - I think it is simply a matter of positioning the "Minus" in the right place

Userlevel 3
Badge +16

Thanks tbyrne, the example worked.

Cheers

Reply