作成者カテゴリ返答の対象
公開
らお
11/16/2001 11:19 AM
文書リンクアイコン 円\マークを含む値の重複制限について
Re: GetDocumentByKeyのオプションを変更

ありがとうとざいます。
ここでうまくいってないみたいで、
key = doc.Code(0)
If sdoc.code(0)=doc.code(0) Then
これでやってみました。同じ事ですよね?
key = doc.GetItemValue("Code1")(0)
If key = sdoc.GetItemValue("Code1")(0) Then
でもこれもまたエラーが出るんです(TT)

今から外出なので...来週もう少しじっくりやってみます。
勝手言いますが、もう少しお付き合いおねがします。
行ってきます〜

Sub Exiting(Source As Field)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim session As New NotesSession
Dim db As notesdatabase
Dim view As notesview
Dim doc As notesdocument
Dim sdoc As notesdocument
Set uidoc = workspace.CurrentDocument
Set db = session.currentdatabase
Set doc=uidoc.document
Dim key As String
'新規文書フォーム上のナンバーフィールド値取得
'key = doc.Code(0)
key = doc.GetItemValue("Code1")(0)
'Key = uidoc.FieldGetText("Code1")
key=convChr(key,"\","")
'************ 重複番号チェック ******************
'同じデータベース内のカウント管理用ビュー取得
Set view = db.Getview("KOKYAKU")
Set sdoc = view.GetDocumentByKey(key,True)
If (sdoc Is Nothing) Then
'先頭に\が付くと\AAでも\Aも検索されてしまう為中身が一致しているか再度チェックする。
If key = sdoc.GetItemValue("Code1")(0) Then
Msgbox("コードに入力された値はすでに存在しますので、値を変更してください")
Else
Msgbox("なし")
End If
Else
Msgbox("コードに入力された値はすでに存在しますので、値を変更してください")
End If
End Sub


[Previous Main Document]
円\マークを含む値の重複制限について (らお)
. . スクリプトを使ったら (simosimo)
. . . . 関数と同じ処理でよいのですか? (らお)
. . . . . . スクリプトでも\マークはできない...(T T) (らお)
. . . . . . . . Re:スクリプトでも\マークはできない (Kounosuke)
. . . . . . . . Re:スクリプトでも\マークはできない (Kounosuke)
. . . . . . . . \を取り除いてしまいます。 (simosimo)
. . . . . . . . . . \マークの置き換え後の重複チェックが... (らお)
. . . . . . . . . . . . GetDocumentByKeyのオプションを変更 (simosimo)
. . . . . . . . . . . . . . Re: GetDocumentByKeyのオプションを変更 (らお) * 現在地 *
. . . . . . . . . . . . . . . . GetItemValueはあまり使用しないほうが・・ (simosimo)
. . . . . . . . . . . . . . . . . . \マークの重複チェックができました♪ (らお)
. . . . . . . . . . . . . . . . . . . . 重複チェックの訂正 (らお)
[Next Main Document]