Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

LotusScript IF question - quick response needed

Posted on 2006-11-02
4
Medium Priority
?
460 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 200 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
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.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

877 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