issue resolved
Subject: Setting the value of a field within WQS - Quite urgent
Remove the ‘SET’ from your problem line. You only ‘set’ class objects like NotesDocuments or NotesItems.
Set doc2.G25689BCom(0) = “Yes”
…should be…
doc2.G25689BCom(0) = “Yes”
Subject: RE: Setting the value of a field within WQS - Quite urgent
small correction,
Set doc2.G25689BCom(0) = “Yes”
should be
doc2.G25689BCom = “Yes”
as you do not use (0) when setting a field value, and you do not use SET either.
Subject: RE: Setting the value of a field within WQS - Quite urgent
Set or no Set, you still can’t write to a single array element in a NotesItem. You can write all of the values at once, or you can append to an existing array (text only). The write-at-once looks like this:
Dim someVariable As Variant
someVariable = document.FieldName
someVariable(0) = newValue
document.FieldName = someVariable
That brings to something in the dozens range the nmber of times I’ve posted more-or-less the same code. I have to assume the search on this forum (and Google) is broken.
Subject: RE: Setting the value of a field within WQS - Quite urgent
issue resolved
Subject: RE: Setting the value of a field within WQS - Quite urgent
What is it that is not working, your code looks ok… what error do you have? On what line?
Subject: RE: Setting the value of a field within WQS - Quite urgent
Hi,
The actual script doesn’t appear to produce any errors. However, the new code added to set the value of field = “Yes” is not setting is to Yes.
The new record created still appears as “No”
Subject: RE: Setting the value of a field within WQS - Quite urgent
Hi,
The actual script doesn’t appear to produce any errors. However, the new code added to set the value of field = “Yes” is not setting is to Yes.
The new record created still appears as “No”