Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Difference between DataLength and Length functions

Avatar

Avatar
Validate 10
Level 2
rahulg1930481
Level 2

Likes

7 likes

Total Posts

46 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
rahulg1930481
Level 2

Likes

7 likes

Total Posts

46 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
rahulg1930481
Level 2

03-01-2021

I was looking into the List of functions available in ACS. I saw two functions DataLength and Length.

NameDescriptionSyntax
DataLengthReturns the number of characters in a stringDataLength(<String>)
LengthReturns the string lengthLength(<string>)

What is the difference between these two functions. Is the difference related to Unicode character length ?

View Entire Topic

Avatar

Avatar
Boost 250
MVP
DavidKangni
MVP

Likes

254 likes

Total Posts

366 posts

Correct Reply

150 solutions
Top badges earned
Boost 250
Validate 1
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Boost 250
MVP
DavidKangni
MVP

Likes

254 likes

Total Posts

366 posts

Correct Reply

150 solutions
Top badges earned
Boost 250
Validate 1
Give Back 5
Give Back 3
Give Back 25
View profile
DavidKangni
MVP

04-01-2021

Hi @rahulg1930481 

DataLength function returns the number of bytes occupy in a variable. It also considered the spaces also.
Length function returns the number of characters in a variable. It also removes the trailing spaces and then return the length.

 

Thanks,

David