Link to home
Start Free TrialLog in
Avatar of Jaziar
Jaziar

asked on

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?  
Avatar of SysExpert
SysExpert
Flag of Israel image

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 !
there is an elseif statement or you could use a case statement
ASKER CERTIFIED SOLUTION
Avatar of SysExpert
SysExpert
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ALso Note that you have a leading space in " Contractor"
If (strFormSelect = " Contractor" ) Then

so that it will not match.