?
Solved

Cause of a checkbox field to disappear with a backend save call?

Posted on 2003-02-21
5
Medium Priority
?
201 Views
Last Modified: 2013-12-18
I have a piece of code in the QueryOpen of a document which works in the backend of the doc and calls a back end save.  When this code is in place, the one checkbox field I have the form totally disappears.  This same piece of code works well in another form with a checkbox field in it.  The form properties are the same with the exception of the non-working form has 'Formulas inherit values from selected document'.  But there is no formula in the Lock field.  Here is the code:

     'If doc is new document then exit sub
     If (Source.IsNewDoc) Then
          Exit Sub
     End If   'New Doc, Lock not reqd
     
     Dim varLock As Variant
     Dim session As New NotesSession
     Dim nnUserName As New NotesName(session.UserName)
     
     'Grab the backend document to do the work there
     Set docBackend=Source.document
     
     'Get the lock field
     varLock=docBackend.GetItemValue("Lock")
     
     'If lock field is not empty - put up message
     If (varLock(0) <> "") Then
          Msgbox ("Document is currently locked by "+varLock(0)+". A read-only copy will be opened for your use.")
          Exit Sub
     End If
     
     'put current user name in lock field to keep doc locked until done editing.
     docBackend.Lock=nnUserName.Common
     Call docBackend.Save(True,True)
     

The last line is the culprit which makes the checkbox field disappear.  Any insight is greatly appreciated!
0
Comment
Question by:Peripheal
5 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 7993644
Is this Lock field checkbox ? If so what is the formula for choices ? If you are pointing to a field, check if this is inherited properly.

~Hemanth
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 7993876
Put into Lock field default value this formula:
Lock

Please be aware that the name of the field has to be without quotas.

Good luck,
Zvonko
0
 
LVL 7

Accepted Solution

by:
scottrma earned 200 total points
ID: 7994054
See this article:

If Checkbox or Radio Button Keyword is Null, Saving via QueryOpen Event Causes Field to Disappear
http://www-1.ibm.com/support/docview.wss?rs=475&context=SSKTWP&uid=sim1c9891c7ea964b25885256547006a248b

Regards,

Scott
0
 

Author Comment

by:Peripheal
ID: 7995440
Scott,

Thank you for the information.  Another one of those wonderful features of Notes!  I just added a default value in the checkbox field to make it work.  That's not what I wanted to do, but I can live with it.

I appreciate your time!

Have a great weekend!
Lisa
0
 
LVL 7

Expert Comment

by:scottrma
ID: 7995527
Hi Lisa,

Glad to hear you were able to use a workaround. Believe me, I have seen Notes do much weirder things than this :-)

Have a great weekend as well.

Regards,

Scott
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
There may be issues when you are trying to access Outlook or send & receive emails or due to Outlook crash which leads to corrupt or damaged PST file. To eliminate the corruption from your PST file, you need to repair the corrupt Outlook PST file. U…
Suggested Courses

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question