Solved

How to get unique names from text box or data label control

  • 4 November 2020
  • 1 reply
  • 36 views

Badge +2

Hi,

I have a scenario where the REST api response returns a field like below - 

"TeamMembers": “FirstName1 LastName1\r\nFirstName2 LastName2\r\nFirstName3 LastName3”and so on … .

There might be n no. of team member names in this. 

In K2 Designer view/form, when I transfer this data (via REST smartobjects) -

in textbox control it looks like-

“FirstName1 LastName1FirstName2 LastName2FirstName3 LastName3” 

and in data label control it displays with line breaks like -

FirstName1 LastName1

FirstName2 LastName2

……. etc

I want to get the count of the “team members names” . I am unable to find out a string format operator or method to get individual names in K2 and get the count .

How to achieve this ?

Thanks

icon

Best answer by chaa 5 November 2020, 02:11

I got it working by using javascript. Could not find any out of the box K2 text formatting method.

View original

1 reply

Badge +2

I got it working by using javascript. Could not find any out of the box K2 text formatting method.

Reply