This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Apr 18, 2016, 8:27 PM
21 Posts

using Evaluate

  • Category: Application Development
  • Platform: All Platforms
  • Release: 9.0.1
  • Role:
  • Tags:
  • Replies: 5

I have never ever been able to get evaluate to work in lotus script.

for example:

Dim id as variant
​empid = "T67014"
 id = Evaluate(|@Left(| & empid & |;1)|)


Can any please tell me ​why doesn't this never works?  ( in this case, I'm trying to get the first character of the string empID.
Sure I can do a loop and count it down, but that seems way more necessary for this simple task ...

​Thank you...

Apr 18, 2016, 9:45 PM
202 Posts
Well in this case you shouldn't use Evaluate
PGZvbnQgc2l6ZT0yIGZhY2U9InNhbnMtc2VyaWYiPkJ1dCBqdXN0IHRoZSBmdW5jdGlvbiA8Yj5s ZWZ0PC9iPjwvZm9udD4NCjxicj4NCjxicj48Zm9udCBzaXplPTIgZmFjZT0ic2Fucy1zZXJpZiI+ RGltIGlkIGFzIHZhcmlhbnQ8L2ZvbnQ+DQo8YnI+PGZvbnQgc2l6ZT0yIGZhY2U9InNhbnMtc2Vy aWYiPuKAi2VtcGlkID0gJnF1b3Q7VDY3MDE0JnF1b3Q7PC9mb250Pg0KPGJyPjxmb250IHNpemU9 MiBmYWNlPSJzYW5zLXNlcmlmIj4mbmJzcDtpZCA9IExlZnQoZW1waWQsMSk8L2ZvbnQ+DQo8YnI+ DQo8YnI+DQo8YnI+PGZvbnQgc2l6ZT0yIGZhY2U9InNhbnMtc2VyaWYiPlJlZ2FyZGluZyBFdmFs dWF0ZTwvZm9udD4NCjxicj48Zm9udCBzaXplPTIgZmFjZT0ic2Fucy1zZXJpZiI+Tm90IHN1cmUg d2h5IGl0IGRvZXNuJ3Qgd29yaywgSSBhbHdheXMNCnBhc3MgYSBkb2MgYWxvbmcgd2l0aCBFdmFs dWF0ZS48L2ZvbnQ+DQo8YnI+DQo=
Apr 19, 2016, 1:45 AM
59 Posts
variant

evaluate always returns an array. try looking for your answer in id(0).

I'm assuming this was just an example - the script statement

left$(empid, 1)

would give you the same result, no?

Apr 19, 2016, 3:20 PM
21 Posts
lol

of course it will.

I totally spaced out the " left$ "

I did look at id(0).. blank...where it should've been a "0" or a "T"....

 

thanks

Apr 19, 2016, 5:09 PM
59 Posts
thinking it through...

yeah, I think I missed something on the evaluate. When I have trouble with evaluate, I break down the command I am trying to use. For you, it would be:

@Left(T67014;1)

I'm assuming that 'T67014' is actually a string and not a field name in the document? If that is true, the statement would fail because the formula is trying to find T67014 as a field name or variable name in the formula context. If you actually want the left-most character in the string to be returned (the 'T'), then the correct syntax would be:

id = Evaluate(|@Left("| & empid & |";1)|)  so that the formula resolves to @Left("T67014";1)

(note the addition of the double quotes)

hope that helps...sorry I missed it the first time around.

Apr 20, 2016, 5:51 PM
21 Posts
thanks

all I needed was a good double quote double quote...

 

thanks again


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal