Solved

LotusScript IF question - quick response needed

Posted on 2006-11-02
4
438 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
[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
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.

734 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