如何从第二个表单添加字段?
我正在修改现有的 Lotus 视图以包含另一个表单中的字段。
我首先附加了一个新列并将其设置为所需的字段。然而,刷新后,新列是空白的,尽管我知道它有数据。
然后我更新了视图选择公式:
SELECT Form = "A" &状态索引< “06”
至:SELECT (Form = "A"| Form = "B") &状态索引< “06”
仍然没有运气。视图刷新成功,但新字段仍为空白。还有什么可以将这个新列添加到此视图中?
这是我第一次尝试 Lotus,所以如果我似乎遗漏了一些主要概念,我可能确实遗漏了。
编辑
如果我使用 SQL 提取这些数据,则语句可能类似于:
Select A.* , B.*
from A inner join B on A.id=B.id
where A.StatusIndex < "06";
这会带来另一个问题:这些表/表单之间的关系在哪里定义?
I'm modifying an existing Lotus view to include a field from another form.
I first appended a new column and set it to the desired field. However, after I refreshed, the new column was blank even though I know it has data.
I then updated the View Selection formula from:
SELECT Form = "A" & StatusIndex < "06"
to:SELECT (Form = "A"| Form = "B") & StatusIndex < "06"
Still no luck. The view is refreshing successfully, but the new field is still blank. What else is there to add this new column to this view?
This is my first time experimenting with Lotus, so if I seem to be missing some major concept, I probably am.
Edit
If I was pulling this data using SQL, the statement would probably be something like:
Select A.* , B.*
from A inner join B on A.id=B.id
where A.StatusIndex < "06";
Which brings up another question: Where is the relationship between these tables/forms defined?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不幸的是,Notes 视图中没有可用的(固有的)“连接”功能。如果您绝对需要视图中同一行(文档)中出现不同的列,则一种选择是对数据进行非规范化,这样在保存“文档 B”时,您可以使用必要的内容更新相关的“文档 A”字段值。 (这也是跨“连接”数据进行全文搜索的唯一真正方法)。
如果视图仅在浏览器上显示,那么您可能还有其他选择,例如进行 AJAX 调用来加载相关数据字段等。
Unfortunately, there is no (intrinsic) "join" functionality available from a Notes view. If you absolutely need the different columns appearing in the same row (document) in a view, then one option is to de-normalize the data, such that upon saving of "Document B" you update the related "Document A" with the necessary field values. (This is also the only real way to get full-text searches to work across "joined" data).
If the view is for display on browsers only, then you may have other options, such as making AJAX calls to load the related data fields, etc.
这是添加多个表单的技巧。这样您就可以轻松添加到允许的表单列表中,而无需使用大量 OR 语句。
@IsMember(Form; "A":"B") &状态索引< “06”
不过,接下来我要尝试的是摆脱您视图中的所有条件,只显示 Form =“B”,假设 B 表单具有您在步骤 1 中添加的字段。如果有效,那么您就知道这只是视图选择公式的问题。
您还可以使用文档属性来检查文档项目。文件>文件>属性带您到达那里。我将三次检查该视图中显示的文档实际上是否具有步骤 1 中字段的一些数据。
最后,确保视图中列的可编程名称是唯一的。双击视图设计器中的列标题,然后单击最后一个选项卡(无檐小便帽)。那里的名称通常与您要在列中显示的字段相同,或者如果列值是公式,则该名称将是 $number。为了安全起见,您可以将该名称更改为您知道唯一的名称。这里的理论是,如果该编程名称与另一列的编程名称匹配,则视图将不会评估列值,而是使用缓存的值,在您的情况下可能是空白。这种情况很少见,但确实会发生。
Here's a trick for adding multiple forms. This way you can easily add to the list of forms allowed without lots of OR statements.
@IsMember(Form; "A":"B") & StatusIndex < "06"
What I would try next, though, is to get rid of all conditions in your view and just show Form = "B", assuming the B form has the field you added in step 1. If that works, then you know it is just an issue with the view selection formula.
Also you can use the Document Properties to inspect document items. File > Document > Properties gets you there. I would triple-check that the documents that appear in that view do in fact have some data for the field in step 1.
Lastly, make sure the programmable name for the column in the view is unique. Double click the column header in the view designer, and then click on the last tab (beanie hat). The name that is there usually will be the same as the field you want to show in the column, or it will be a $number if the column value is a formula. You can change that name to something you know is unique just to be safe. The theory here is that if that programmatic name matches another column's programmatic name, then the view will not evaluate the column values and instead will used cached values, which in your case might be blanks. It's rare, but it does happen.
Ken 提到的“多重表单”技巧有一个更简单的版本:
Select Form = "A":"B" &状态索引< “06”
或者如果您愿意:
选择 (Form = "A":"B") &状态索引< “06”
该公式表示: if (form = A 或 B) AND StatusIndex < "06"
注意:确保 StatusIndex 是文本(正如您所引用的那样),并且带有值的字段 StatusIndex 包含在两种表单中。如果没有,你需要修正你的逻辑。
另外:文档按排序或时间顺序显示,一行显示一个,因此您不能将 A 和 A 放在一起。 B 数据在单行上。它可能看起来像:
或者
但从来没有
There is a simpler version of the 'multiple form' trick noted by Ken:
Select Form = "A":"B" & StatusIndex < "06"
or if you prefer:
Select (Form = "A":"B") & StatusIndex < "06"
This formula says: if (form = A or B) AND StatusIndex < "06"
Note: Be sure StatusIndex is Text (as you've quoted it) and the field StatusIndex with a value is included on both forms. If not, you need to fix your logic.
Plus: Documents display in a sorted or chronological order, ONE to a line, so you cannot have A & B data on a single line. It may look like:
OR
But never