I had a problem last week with a couple of forms that have fields that inherit values from fields on the document that is open when the new document is created. On one form, the field values were set properly, but on the other they were not. The form being created is a response-to-response form. The form that worked was a response form, so at first I thought the problem with the form that was not working was because it was a main form. I discovered that wasn't the problem when I was able to get that form to inherit a text field.
The fields I was trying to inherit were names fields. And the two "parent" forms used different names for the names I wanted to inherit. On the form that worked, the fields were named the same on that form and on the child form I was using for my new document. Aha! I changed the field name on the child form to match that of the form that didn't work, and that started working; of course, that also broke the other form that worked previously.
What I ended up doing was adding a Computed For Display field to the child form that was named the same as the field on the form that didn't work. It has a value in it when a new child is created and is blank at all other times. I then reference that field in the formula for my name field and it works for both forms.
I couldn't find anything that said Names fields inherit differently than other fields. but they apparently are different. After spending about 4 hours trying to figure it out, I figured I'd write it out here, just in case it comes up again.
XPages: Returning to the Prior Page
Fri, Mar 15th 2013 2:22p Don McNally I read this post from Brad Balassaitis and shared that "I should have blogged that last year when I did it". A couple of people encouraged me to blog it just for a different perspective, so here we go. I have a button in my left navigator that opens an XPage for processing documents with a bar code scanner. That XPage does not include the navigator; it's like a new document. Once the user is done processing, they click a Finished button and I wanted them to go back where they came from. My [read] Keywords: lotus
XPages: Detecting and Logging Field Value Changes
Sat, Feb 2nd 2013 7:22p Don McNally Recently I had a request to add functionality to an XPages application I wrote and implemented last year. They wanted the ability to log changes made in specific fields. I did some searching and found the resources I needed: valueChangeListener code as a managed bean by Tony McGuckin, which was linked from valueChangeListener implementation code from Declan Sciolla-Lynch, which pointed to A better way to update log fields by Chris Toohey I used my "R&D skills" to set up the code in my [read] Keywords: lotus
More Excel Code: Inserting and Copying Rows
Tue, Jan 24th 2012 2:02p Don McNally I was working on some code to export data to a pre-formatted Excel file and, as part of that, needed to be able to insert rows into a range so that the data I added would be included in formulas below it (they were column totals and data summaries). As I find typical when trying to control Excel from LotusScript, I couldn't locate examples of the code I needed. That doesn't mean they aren't out there, just that I couldn't find them. After some experimentation and some dumb luck stumbling on [read] Keywords: lotus
Inheriting Field Values for Names Fields
Tue, Jun 28th 2011 11:05a Don McNally I had a problem last week with a couple of forms that have fields that inherit values from fields on the document that is open when the new document is created. On one form, the field values were set properly, but on the other they were not. The form being created is a response-to-response form. The form that worked was a response form, so at first I thought the problem with the form that was not working was because it was a main form. I discovered that wasn't the problem when I was able to get [read] Keywords: lotus
Barcodes in Lotus Notes Applications
Thu, Mar 31st 2011 2:02p Don McNally If you have ever wanted to implement barcoding in a Notes application, it may be easier to do so than you think. You really need four things to make it work: A barcode font that is deployed to machines that will be printing the things (eg. paper or labels) that have the barcode on them. LotusScript code to generate the field value for the barcode. Simple barcodes, like Code 39, just need start and stop characters before and after the number you are putting on a barcode, but they have a limite [read] Keywords: lotus