Domino 9 und frühere Versionen > Entwicklung

Radiobutton Feld mit numerischem Wert per LS abfragen

<< < (3/5) > >>

immanuel:
Hallo!

Ich hab noch ne andere Frage. Und zwar funktioniert bei diesem Code die IF Bedingung nicht so wie ich möchte:

--- Code: ---Sub Exiting(Source As Field)
Dim workspace As New NotesUIWorkspace
Set doc = workspace.CurrentDocument
Set doc = workspace.EditDocument( True )

Dim ws As New NotesUIWorkspace
Dim NotesDoc As NotesDocument
Set NotesDoc = ws.CurrentDocument.Document
Dim twoLiner  As String
Dim ratingValue As Integer
Dim ratingComent  As String
Dim commentLength As Integer

ratingValue = Cint (NotesDoc.iq_RateIT (0))
ratingComment = Cstr(NotesDoc.iq_RateITComment(0))
commentLength = Len(ratingComment)

' Klammern sind für Array Wert 0
Messagebox commentLength , MB_OK ,"Variabeltest"

If (ratingValue <= 50 & commentLength < 5) Then
twoLiner = |Bitte begründen Sie unten Ihre Bewertung.
Sie helfen so unsere Dienstleistung zu verbessern. Vielen Dank!|
Messagebox twoLiner , MB_OK ,"Hinweis"
doc.GotoField ("iq_RateITComment")
Else

End If
Call doc.RefreshHideFormulas
Call doc.Refresh
End Sub
--- Ende Code ---

Vorallen If (ratingValue <= 50 & commentLength < 5) funktioniert nicht. commentLength gibt einen CInt zurück, siehe auch "Messagebox commentLength , MB_OK ,"Variabeltest""

Auch wenn der Text der Variable ratingComent mehr als 5 Zeichen hat und  commentLength mehr als 5 sein sollte, klappts mit der Bedingung nicht.

Vielen Dank für eure Hilfe!

Gruss
Manuel

koehlerbv:
Ich gehe mal davon aus, dass Du mit "&" das LS-"AND" meinst.
"&" verknüpft in LS Strings und hat dort mit dem boolschen Operator "AND" nichts zu tun.

HTH,
Bernhard

immanuel:
Autsch!!!

Naja, LS ist schon etwas speziell  ;D

Gruss
Manuel

Axel:

--- Zitat von: immanuel am 22.10.04 - 09:22:09 ---Autsch!!!

Naja, LS ist schon etwas speziell  ;D

Gruss
Manuel

--- Ende Zitat ---

Was ist daran speziell?   ??? ???
Ist ein Basic-Dialekt.


Axel

immanuel:
Hi!

Ich bin mir gewohnt, dass IF (i=1) eine Variabelinitialisierung ist und keine Bedingung. In den meisten Programmiersprachen verwendet man doch IF (i==1) und verwendet | also logisches Oder und z.T. && als UND :-)

Greez
Manuel

Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln