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_OKCANCELL IST, "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?
strFormType(0) = "FTR"
strFormType(1) = "Contractor"
strFormType(2) = "Supplemental"
varReturn = ws.Prompt(PROMPT_OKCANCELL
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?
there is an elseif statement or you could use a case statement
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ALso Note that you have a leading space in " Contractor"
If (strFormSelect = " Contractor" ) Then
so that it will not match.
If (strFormSelect = " Contractor" ) Then
so that it will not match.
Select Case strFormSelect
Case "Contractor" :
Case :
See the Design Help for more info.
I hope this helps !