• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 462
  • Last Modified:

LotusScript IF question - quick response needed

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
Jaziar
Asked:
Jaziar
  • 3
1 Solution
 
SysExpertCommented:
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
 
brwwigginsIT ManagerCommented:
there is an elseif statement or you could use a case statement
0
 
SysExpertCommented:
also

Syntax
If condition Then
     statements
[ ElseIf condition Then
     statements ]
...
[ Else
      statements ]
End If
Elements
0
 
SysExpertCommented:
ALso Note that you have a leading space in " Contractor"
If (strFormSelect = " Contractor" ) Then

so that it will not match.



0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now