Solved

LotusScript IF question - quick response needed

Posted on 2006-11-02
4
432 Views
Last Modified: 2013-12-18
writing a simple lotusscript that prompts for a answer to 3 choices

strFormType(0) = "FTR"
strFormType(1) = "Contractor"
strFormType(2) = "Supplemental"

varReturn = ws.Prompt(PROMPT_OKCANCELLIST, "Please Select Requisition Type", "Which of open requisition are you requesting?", "", strFormType)
strFormSelect = varReturn      

So basically from here I want to check to see which one is selected and have that form to open

If (strFormSelect = " Contractor" ) Then
            Set doc = New NotesDocument(db)
            doc.Form = "CNTR Form"
    If Else (strFormSelect = "FTR" ) Then
                Set doc = New NotesDocument(db)
            doc.Form = "FTR Form"
        Else
                Set doc = New NotesDocument(db)
            doc.Form = "Supp Form"
        End Else
    End If Else
End If

But I am finding that there is no such thing as If Else.  How would I go about this?  
0
Comment
Question by:Jaziar
  • 3
4 Comments
 
LVL 63

Expert Comment

by:SysExpert
ID: 17858868
Actually It is probably best to use a case statement.

Select Case strFormSelect
      Case "Contractor" :  
Case :
 
 See the Design Help for more info.

I hope this helps !
0
 
LVL 20

Expert Comment

by:brwwiggins
ID: 17858879
there is an elseif statement or you could use a case statement
0
 
LVL 63

Accepted Solution

by:
SysExpert earned 50 total points
ID: 17858882
also

Syntax
If condition Then
     statements
[ ElseIf condition Then
     statements ]
...
[ Else
      statements ]
End If
Elements
0
 
LVL 63

Expert Comment

by:SysExpert
ID: 17859119
ALso Note that you have a leading space in " Contractor"
If (strFormSelect = " Contractor" ) Then

so that it will not match.



0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

809 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