0

I have a main form which contain an embedded view. This embedded view is displaying field values that exist in another form. How can i display fields that are in the main form and fields that are in the other form on the same ordinary view?

4

4 回答 4

3

Firstly, your View Selection formula needs to select documents created with both forms

SELECT Form = "Main" | Form = "Other"

or you can use a short-hand version

SELECT Form = "Main":"Other"

Then you need to enter a conditional formula in the column where you want to display values from documents created with both forms

@IF(Form = "Main" ; FieldName1 ; Form = "Other" ; FieldName2 ; "")

although, as only those two forms are permitted, you can shorten that too

@If(Form = "Main"; FieldName1 ; FieldName2)

Hope this helps, Phil

于 2012-09-10T08:21:17.483 回答
0

You could emulate the view in a rich text field, using the technique I describe here: http://www.bleedyellow.com/blogs/texasswede/entry/dynamictables

You need to modify the code to get both your "main" document and your "other" document, and combine them together into one row. This way you can display values from different documents (even one "main" and multiple "other" documents).

It would work something like this:

  • Create temp document with rich text field.
  • Get the first "main" document and "other" document(s) associated with it (doc.Responses if they are child documents).
  • Create a new document using the row template form, and put values into the different fields.
  • Render the new row document into the rich text field on the temp document.
  • Repeate above steps for each main document.
于 2012-09-10T14:52:57.263 回答
0

If you only have values from one other document displayed on the main form, there's no need to use an embedded view to display the values. You could use computed text to display the values from the second document along with values from the main document.

If you need to view multiple documents and want to include values from the main document in the embedded view on the same lines as the other documents, I would recommend having the values from the main document be stored on those other documents, rather than trying to put the other document data on the main form (since there would be multiple other documents, requiring multiple field values on the main).

That said, if the field values are already on the main form, why do you need to display them a second time on those lines in the embedded view? After all, it would repeat the same value on every line in that column.

于 2012-09-10T15:01:24.417 回答
0

Visualize it in sql format:

Form A:
EmpNum | Name

Form B:
Name | Project

Can I have something like this in Lotus Notes:

SELECT *
FROM Form A, Form B
WHERE Form A.Name = Form B.Name

于 2012-12-05T06:47:40.437 回答