Beiträge von mrrobe

    Krass, wenn ich in die Ansicht gehe in der der Fehler kommt, wird mir folgendes gezeigt:


    Field Name: Project_T
    Data Type: Time/Date
    Data Length: 8 bytes
    Seq Num: 1
    Dup Item ID: 0
    Field Flags: SUMMARY


    04.06.2010 00:00:00 CEDT


    Wähle ich ein Dokument welches den Importwert 4.5f hatte wird mir dies gezeigt:


    Field Name: Project_T
    Data Type: Text
    Data Length: 4 bytes
    Seq Num: 1
    Dup Item ID: 0
    Field Flags: SUMMARY


    "4.5F"


    Ron

    Hallo,


    ich bekomme diese Fehlermeldung >>ERROR: incorrect data type for operator or Function <<
    nachdem ich mit diesem Script (freeware aus internet) eines CSV-Datei eingelesen habe


    >>
    Sub Initialize

    'will import from Excel up to 256 columns by 65,536 rows

    Dim session As New NotesSession
    Dim uiws As New NotesUIWorkspace
    Dim form As NotesForm
    Dim db As NotesDatabase
    Dim doc As NotesDocument
    Dim item As NotesItem
    Dim row As Long
    Dim xlFilename As String
    Dim xlsApp As Variant
    Dim xlsWorkBook As Variant
    Dim xlsSheet As Variant
    Dim rows As Long
    Dim cols As Integer
    Dim x As Integer
    Dim itemName As String
    Dim flag As Integer
    Dim formAlias As String
    Dim sortEval As String
    Dim sortedList As Variant
    Dim indexLo As Long
    Dim indexHi As Long


    On Error Goto ErrorHandler

    Set db = session.CurrentDatabase

    fn= uiws.Prompt(1, "Reminder- Excel Worksheet Setup", "Make sure that the first row of your worksheet contains EXACT the values as explained in Help file: Procedure: IMPORT FSDMS issues.")

    'Get Excel file name
    fn =uiws.OpenFileDialog(False, "Select the CSV-File to Import", "Excel files | *.csv", "c:\")
    xlFilename = Cstr(fn(0)) ' This is the name of the Excel file that will be imported

    'Get list of form names
    ' x=0

    ' Print "Preparing List of Database Forms ..."

    ' Forall f In db.Forms
    ' Redim Preserve formlist(x)
    ' formlist(x)=f.name
    ' x=x+1
    ' Print "Preparing List of Database Forms ..."& Cstr(x)
    ' End Forall

    'Sort the form names for the dialog box
    ' indexLo= Lbound(formlist)
    ' indexHi= Ubound(formlist)
    ' Call QuickSort(formlist , indexLo, indexHi)

    'Choose the form to use for import
    ' formname = uiws.Prompt(4, "Choose Import Form", "Please select which form is to be used for this input.", formlist(0), formlist)
    formname = "PDF_D"
    If formname= "" Then End

    'Get the form object so that we can check field names
    Set form= db.GetForm(formname)

    'If the form has an alias, use it to select the form
    If Not Isempty(form.Aliases) Then
    Forall a In form.Aliases
    formname=a
    End Forall 'a In form.Aliases
    End If 'Not Isempty(form.Aliases)

    'Next we connect to Excel and open the file. Then start pulling over the records.
    Print "Connecting to Excel..."

    ' Create the excel object
    Set xlsApp = CreateObject("Excel.Application")

    'Open the file
    Print "Opening the file : " & xlfilename
    xlsApp.Workbooks.Open xlfilename
    Set xlsWorkBook = xlsApp.ActiveWorkbook
    Set xlsSheet = xlsWorkBook.ActiveSheet
    xlsApp.Visible = False ' Do not show Excel to user
    xlsSheet.Cells.SpecialCells(11).Activate
    rows = xlsApp.ActiveWindow.ActiveCell.Row ' Number of rows to process
    cols = xlsApp.ActiveWindow.ActiveCell.Column ' Number of columns to process

    'Make sure we start at row 0
    row = 0
    Print "Starting import from Excel file..."

    Do While True
    row = row + 1

    'Check to make sure we did not run out of rows
    If row= rows+1 Then Goto Done

    'field definitions for notes come from first row (row, column)
    If row=1 Then
    For i=1 To cols
    Redim Preserve fd(i)
    'the replace function used here removes spaces from the field definitions in the first row
    fd(i)= Replace(xlsSheet.Cells( row, i ).Value, " ", "")

    flag=0

    Forall f In form.Fields
    If Lcase(fd(i)) = Lcase(f) Then flag=1
    End Forall 'f In form.Fields

    If flag=1 Then
    Goto Skip
    End If ' flag=1

    If Not flag=1 Then
    msg="The field name "& fd(i) &" does not appear in the form you have chosen. Exiting import."
    Msgbox msg
    Goto ErrorHandler
    End If 'flag=1

    Skip:
    Next 'For i=1 To cols
    End If 'row=1

    'Import each row into a new document
    If Not row = 1 Then

    'Create a new doc
    Set doc = db.CreateDocument
    doc.Form = FormName

    For i= 1 To cols
    Set item = doc.ReplaceItemValue( fd(i), xlsSheet.Cells( row, i ).Value )
    ' inserted to define the originator as author, hint from Rick Harroun
    If fd(i) = "Originator_T" Then doc.AuthorNames_T = xlsSheet.Cells( row, i ).Value
    Next ' i= 1 To cols

    'Save the new doc
    Call doc.Save( True, True )

    End If 'Not row = 1 Then

    Print "Processing document number "& Cstr(row) & " of " & Cstr(rows)

    Loop 'Do while true

    Done:

    Print "Disconnecting from Excel..."
    'Close the Excel file without saving (we made no changes)
    xlsWorkbook.Close False
    'Close Excel
    xlsApp.Quit
    'Free the memory that we'd used
    Set xlsApp = Nothing

    'Clear the status line
    Print " "


    ErrorHandler:
    If Err = 184 Then
    Msgbox "No file chosen. Exiting Import."
    Print "No file chosen. Exiting Import."
    Resume ErrorOut
    End If ' err=184

    If Err = 6 Then
    Messagebox "Make sure that you do not have more than 65,536 rows of data to import." ,MB_OK+MB_ICONINFORMATION,"Error! "
    Print "Too many rows in Excel document. Exiting Import. Disconnecting from Excel..."
    'Close the Excel file without saving (we made no changes)
    xlsWorkbook.Close False
    'Close Excel
    xlsApp.Quit
    'Free the memory that we'd used
    Set xlsApp = Nothing
    Resume ErrorOut
    End If ' err=184

    If (Err) And (Not Err = 184) And (Not Err = 6) Then

    Msgbox "Lotus Notes Error # " & Err &". Please contact your Notes administrator for help. Exiting Import."
    Print "Error # "& Err

    If Not xlsWorkbook Is Nothing Then
    xlsWorkbook.Close False
    End If ' Not xlsWorkbook Is Nothing

    If Not xlsApp Is Nothing Then
    xlsApp.Quit False
    End If 'Not xlsApp Is Nothing

    Resume ErrorOut

    End If '(Err) And (Not Err = 184) And (Not Err = 6)

    ErrorOut:

    End Sub
    <<


    Das Feld (Project) was in der Form belegt wird hat folgende Formel:
    >>
    cView1 := "($SystemLU)";
    Col := 1;
    Val:=@Unique(@DbColumn("Notes" : "NoCache"; ""; cView1; Col));
    @If(@IsError(Val);"No projects defined!" ; Val)
    <<


    Wenn in Der CSV-Datei das Feld, welches den Fehelr leifert der Wert [4.5F] drin steht, wird es ohne Fehler übernommen, wen jedoch nur [4.6] drin steht, wird der Wert als Datum [04.06.2010 00:00:00 CEDT]interpretiert.


    Nun habe ich gedacht, wenn ich den Wert n der CSV-Datei in “4.6“ setzet geht es vielleicht, leider nicht.


    Auch die Formel @text(Project)in der Ansicht "($SystemLU) hat nicht geholfen.


    Hat jemand einen Tipp. Im voruas vielen Dank.
    Ron

    Ja, wenn diese einen Status erreicht haben, es gibt ein Feld (Step_N, computred when composed), dass diesen Status festhält. Mittels diesem Feld wird eine Art Workflow abgebildet, bei Werten > 190 darf nur noch der Admin bzw. User mit einer best. Rolle, editierenRon

    Danke für dei Antworten. Ich bin mir noch immer nicht sicher welches die besserre Methode ist, denn beide Masken würden auf gleiche Auswahlfelder zugreifen und was ich sicherstellen muss, ist dass einige Dokumente nicht mehr verändert werden dürfen. Da die neuere DB mit gleichen Maskennamen erheblich gewachsen ist, wollte ich eigentlich abgschlossene Dokumente in die alte DB schieben in der jedoch eineige noch volle Rechte haben.
    Ich glaueb wenn ich alle auf nur Lesend setze, bis auf Admin, habe ich das Problem dann gelöst und eine Veränderung der Daten auf ein Minimum reduziert, oder was mein Ihr.


    Ich muss dazu sagen ich bin nicht der Profientwickler und meine Kenntnisse enden mit der Formelsprache.
    Ron

    Danke für den Tipp,
    es bleiben bei mir noch ein ppar Fragen offen.
    da beide Formulare den gleichen Namen haben (jeweils in unterschieldichen DBs) wie stelle ich sicher, dass die enuen Doks auf das neue Formular zugreifen. Des weietren gehen ich davon aus,m dass ich den Alias der hinter "|" aufgeführt ist, auch ändern muss, bei 12000 doks ein Haufen aufwand, zumal ich auch nicht weiß wo überall der Formname hernagezogen wird. Gut das kann ich ja mit synopsis herausfinden. Eine Unsicherheit bleibt bei mir jedoch bestehen.
    Danke

    Hallo,


    ich kann mich erinnern, dass es in Notes doch die Möglichkeit gibt, im Dokumnet das zugrunde liegende Formala rmit abzuspeichern, wei geht das nochmal?
    Ich habe da nämlich eine ältere DB, die ich als Archiv von DOkumenten einer neuern DB nutzen möchte, jedoch haben die alten Dokumente ein älteres Formualr, das neue ist mehrmals erweiteret und verändert worden.
    Nun wollte ich den alten vorhandenen Dokumente das alte Formular mit beifügen durch ein refresch, und dann das neue Fomular (zufälliger Weise der gleicher Name) einfügen, worauf die manuel archivierten Dokumente neueren Datums dann zu greifen sollen.
    Den Mechanismus, dass das Formular dann im Dok gespeichert werden oll, wollte ich dann wieder sbstellen und das neue modifizeriet Formular aus der aktuellen DB zur Verfügung stellen..
    Danke für die Tipps

    Habe mich entschlossen den Standard-Export CSV zu nehmen und als *.TXT abzuspeichern, das erleichtert das Öffnen mit Excel 2007. Da unter den DE-Einstellungen Excel ein Semikolon anstelle des Kommas in der CSV-Datei erwartet. Was soll ich sagen, Microsoft!
    Ron

    Hallo,
    Lotus Notes bietet die Möglichkeit eine Ansicht zu exportieren. Nachdem Excel 2007 kein Lotus-1-2-3 mehr unterstützt wollte ich nach CSV exportieren, jedoch anstelle des Kommas "," sollte ider Feldtrenner das Semikolon ";" sein. Ist es möglich dies einzustellen, ich dachte, das ging eso wie bei Windows, und Office, wenn ich da die Ländereinstellung auf Deustch habe, wird als Trenner das Semikolon ";" genommen.


    Ron

    Dirk,


    weder die eine noch die andere Variante funktioniert, ich bekomme entweder alle Dokumente "SELECT (@IsAvailable($Conflict) & @IsAvailable($REF)) | (!@IsAvailable($Conflict) & !@IsAvailable($REF)" oder nur die Replike mit "SELECT (@IsAvailable($Conflict) & @IsAvailable($REF)) "
    und unter SELECT Form = "Maskenname" alle Dokumente mit Mailanhang??
    Ron

    Dali,
    schön und gut, jedoch habe ich zu den Dokumenten auch Antwortdokumente (memos) die ich nicht angezeigt bekommen möchte, sondern nur Antwortdokumente, die ein Replicationsconflikt beschreiben, also das Feld $conflict enthalten?? Auch habe ich verschiedene Formulare, die Verwendung finden und auch ein Konflikt erzeugen können.
    ROn

    Hallo,


    ich versuche gerade eine Ansicht zu erstellen, in der alle Hauptdokumente mit allen Replicationskonflikt-Dokumenten angezeigt werden, aber irgendwie klappt das nicht.
    Mit SELECT @IsAvailable($Conflict) sehe ich zwar das Konfliktdokument aber nicht das Hauptdokument,
    mit SELECT @All | @IsAvailable($Conflict) kommt nur Schrott
    und mit SELECT Form ="Formname" & @IsAvailable($Conflict) erhalte ich auch nur das Konfliktdokument?
    Wo ist mein Gedankenfehler?
    Ron