User Examples

Post your favorite mivascript examples.
NOTE: Give your description a title using the h2 tag. <h2>Your Title </h2>

User Annotations: user-examples
Ray Yates : mivascript at, pcinet d0t com
09/13/2011 18:34 p.m.

LastToken(): Retreive the last item in a list

Given a delimited list this function returns the last item (token) in the string in a delimited string.
<MvFUNCTION NAME = "LastToken" PARAMETERS = "target var, delimiter" STANDARDOUTPUTLEVEL = "">
    <MvFUNCTIONRETURN VALUE = "{ gettoken(l.target, l.delimiter, len(l.target) - len(glosub(l.target, l.delimiter, '')) + 1) }">
</MvFUNCTION>