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
Related Q&A from Todd Fuder
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.