i currently have a script that connects to a different platform and retrieves list of topics and populates that list in a drop down field within my form. Currently today there is only 1 view being accessed from that other platofrm. Now there is another view that was created and the populated field on my form needs to use both views but 1 or the other depending upon a field value in my form. Here is the existing script:
Sub Postopen(Source As Notesuidocument)
Dim ses As New LCSession
Dim doc As NotesDocument
Set doc = Source.Document
Dim con As New LCConnection("oledb")
.Provider = "SQLOLEDB"
.Server = "ENYRSRSQL"
.Database = "EPT"
.Metadata = "ActiveProjects"
.UserID = "3PTR3@d"
.Password = "3PTR3@d"
On Error Resume Next
If Err = True Then
Messagebox "Unable to Connection failed with error " & Err & ": " & Error
Dim MyFldList As New LCFieldList
Dim MyFld As LCField
Dim SQL As String
Dim MyResult As String
SQL = "SELECT RTRIM(Project)+' - '+RTRIM(Title) FROM ActiveProjects ORDER BY Project DESC"
con.Execute SQL, MyFldList
Set MyFld = MyFldList.GetField(1)
While (con.Fetch(MyFldList) > 0)
MyResult = MyResult & MyFld.Text(0) & Chr(10)
Set MyFldList = Nothing
Set MyFld = Nothing
Set con = Nothing
Set ses = Nothing
the new view is called ActiveProjectsMEIPASS. The original view is called ActiveProjects as you can see in the script above. If my existing field EVDproject = MEIPASS value on the form then I want to use the new view on the other platform and retrieve projects only assosciated with MEIPASS other wise use the existing view ActiveProjects and bring in all non MEIPASS projects.
got bits and pieces but I can't the if structure.
Thank you !