Problem solve Get help with specific problems with your technologies, process and projects.

Trying to update existing response docs with new fields

I am trying to update existing response docs that have a stored form with new fields. I want to set the values to those fields through dblookups to a view sorted by a docid field that is on the parent doc. The docid field on the parent doc = @Text(@DocumentUniqueID)and the docid field on the child doc =@If(Form="Customer";@Text(@InheritedDocumentUniqueID) ;@Text($REF)) the child doc inherits from the Customer doc. All I get returned is: "File does not exist". The sorted column in the view that I am using as a key has a value of DocID.

What am I doing wrong? Can this not be done in formula?
A: Let me see if I understand this correctly.

1. You have two forms: "Customer" and a child form we'll call "Child".
2. You have a field in the "Customer" form, called DocID, which evaluates to @Text(@DocumentUniqueID)
3. You have a field in the "Child" form, called DocID, which evaluates to @If (Form="Customer"; @Text(@InheritedDocumentUniqueID);@Text($REF))
4. You have a lookup view, sorted on DocID, which is supposed to show both the "Customer" and "Child" documents.
5. In your lookups, you are returning "File does not exist"

Okay. A couple of things:

A. "File Does Not Exist" is a wierd error to get during a lookup. Maybe your @DBLookup() function isn't formed properly.

B. @InheritedDocumentUniqueID should equal $REF, since they are both the same thing. In your code, you are checking to see if the form is "Customer", which I read as being the parent form. It, therefore, shouldn't have an @InheritedDocumentUniqueID. You'd want to change that to @DocumentUniqueID, instead. The last parameter of the @If can remain the same or be changed to @InheritedDocumentUniqueID.

C. If the parent document is from a form called "Customer", and the child document is from another form name, why are you checking to see if the form is called "Customer" in the DocID field formula for the child? If the child exists (and if I'm reading the question right) it should be a response and should have an @InheritedDocumentUniqueID or a $REF field. It should never be the "Customer" form.

Dig Deeper on Domino Resources - Part 6

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...