cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Determine Length of a Tweet

Hi Community Team, 

 

How do I determine the length of a tweet? I am using an if statement to determine if the length of a tweet is less than 255 then return the length of the tweet if its more than 254 then return 254. I am currently getting an invalid expression error. What am I missing? 

 

if(greater(length(string(triggerBody()?['TweetText'])),254),254,(length(string(triggerBody()?['TweetText'])))

 

Kind Regards, 

Nathaniel

1 ACCEPTED SOLUTION

Accepted Solutions
sudharsan1985
Super User
Super User

Hi @Anonymous 

Your expression missed few closing braces, here is the correct expression.

if(greater(length(string(triggerBody() ? ['TweetText'])), 254), 254length(string(triggerBody() ? ['TweetText'])))
 
Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...
Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

View solution in original post

1 REPLY 1
sudharsan1985
Super User
Super User

Hi @Anonymous 

Your expression missed few closing braces, here is the correct expression.

if(greater(length(string(triggerBody() ? ['TweetText'])), 254), 254length(string(triggerBody() ? ['TweetText'])))
 
Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...
Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (70,042)