?
Solved

LotusScript question (simple)

Posted on 2003-02-20
8
Medium Priority
?
627 Views
Last Modified: 2013-12-18
Hi experts,

I want to get a value from a picklist using LotusScript, using uiws.PickListStrings(etc etc). This is working fine, but there is also a cancel button using the picklist and I want to check if the cancel is pushed and then exit the code.

This is not working:

choice = uiws.PickListStrings(3,False,"domino1","dbase-algemeen\p&o-idee.nsf","(AlleInzendingen)","Selecteer het ideenummer",_
     "Selecteer hier het ideenummer waaraan dit document toegevoegd dient te worden",1)
     
     If choice(0) = "" Then
          Exit Sub
     End If

What do I need to do to check the cancel button and exit when pushed ?

Greetings,

Bob
0
Comment
Question by:oosterbaan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 7

Expert Comment

by:scottrma
ID: 7990950
From the Designer Help:

PickListStrings

This method returns a Variant containing a stringArray if you click OK, or it could return Nothing if you click Cancel.

So check like this:

If choice Is Nothing Then
       Exit Sub
End If

Regards,

Scott
0
 

Accepted Solution

by:
cowarish earned 200 total points
ID: 7991329
If Isempty(choice) Then
End
End If
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 7993039
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Author Comment

by:oosterbaan
ID: 7996038
Thanks cowarish,

Your version is working (-:

If choice Is Nothing Then
    Exit Sub
End If

is generating a error message...Sorry !!

Greetings,

Bob
0
 
LVL 7

Expert Comment

by:scottrma
ID: 7996256
Hmm, interesting, perhaps the Designer Help in R5 is wrong....wouldn't be the first time it has happened. Also, did you notice how it said:

or it "could" return Nothing if you click Cancel

What's up with the "could"? They (Lotus) sound like they're not sure what could happen :-)

Cheers,

Scott
0
 
LVL 1

Author Comment

by:oosterbaan
ID: 7997918
Hi Scott,

When using it like that, it's returning a error message:

"Type mismatch"

I'm having the same problem right now with something like this, only with a NotesItem. I have solved it already with a workaround, but I'm not satisfied.

I'm want to access a notesitem on a document, but in some cases the item is not there, so the item is not set...

Set item = doc.GetFirstItem("FieldName")
 If item Is Nothing Then
      item.IsReaders = False
 End If

This is also not working.... Hmmmmm

Greetings,

Bob

0
 
LVL 7

Expert Comment

by:scottrma
ID: 7998669
Well, that one isn't working because if item is Nothing, then you can't access any of item's properties or methods, such as its IsReaders property. Should probably be:

If Not (item Is Nothing) Then
     item.IsReaders = False
End If

Regards,

Scott
0
 
LVL 1

Author Comment

by:oosterbaan
ID: 8007527
Thanks Scott for your response...

I'll will try this !!!

Greetings,

Bob
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

770 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