[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

@Word formula language function written as a javascript function?

Posted on 2006-06-02
3
Medium Priority
?
481 Views
Last Modified: 2013-12-18
Anyone have the @Word formula language function written as a javascript function?  Accepting the 3 parameters and returning the specified word...

I could really use this and cant figure out how to write it...
0
Comment
Question by:TheRookie32
3 Comments
 
LVL 18

Expert Comment

by:marilyng
ID: 16821666
var word = this.value.split(delimiter)
alert(word[0])

other variations, but I thought you would find this amusing.
0
 
LVL 13

Accepted Solution

by:
CRAK earned 800 total points
ID: 16823587
Marilyn is right, but since you're after a 3 parameter equivalent:

function word(source, separator, element)
{
   return(source.split(separator)[element])
}

You may want to fiddle around with the value of <element>:
@Word returns elements 1 and up, javascript's split generates a 0-based array (1st element has index 0).
0
 
LVL 6

Author Comment

by:TheRookie32
ID: 16835586
very nice, thanks!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Screencast - Getting to Know the Pipeline
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question