Lotus 域类型(可编辑,计算,创建时计算、显示时计算)

本文详细介绍了文档中不同类型的字段,包括可编辑字段、计算字段、创建时计算字段及显示时计算字段的特点与应用场景。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Type of computed fieldFormula calculates

Edit

编辑

You choose whether a field is editable or computed in the field properties box, when you create the field. If a field is editable, a user can enter or change the value of the field. If a field is computed, a formula calculates the field value. Users can't change the values in a computed field. Number, date/time, authors, readers, and names fields are usually computed. Text, rich text, and choice list fields are usually editable.

当文档是编辑状态时,用户可以编辑此域的信息,该域的可编辑状态与文档相同。大部分域使用这种域,用于用户填写信息。

Computed

计算

A computed field formula calculates each time a user creates, saves, or refreshes a document.

该域类型在任何状态下都是不可编辑的,每次文档保存的时候,该域都会根据公式进行值的计算,然后将计算结果写到到文档对应的域值中,常用的。

Computed when composed

创建时计算

A computed-when-composed field formula calculates only once: when the user first creates the document. Use this type of formula in a field to preserve information about the origin of a document, such as the creation date or original author, or to create a field whose original value never changes, such as a document sequence number.

该域类型也是在任何状态下都是不可编辑的,创建文档的时候该域生成,并且在文本编辑的时候,该域不会随着文档的变化而重新进行计算。常用到的比如确定文档的创建者,只需要在域默认值中写入@username就OK,以后不管是谁编辑,该值永远是文档的创建者,这个是和普通计算域的区别。

Computed for display

显示时计算

A computed-for-display field formula recalculates each time a user opens or saves a document. Use this type of formula in a field to display information that is relevant only to the immediate session, such as the current time or the results of calculations that you don't need to save. The field value exists during the current session only and is not stored. You cannot display the contents of a computed­for­display field in a view

类似计算文本,当文档打开的时候,根据域中的公式现去计算该域的值。注意一点,显示时计算域,在文档保存时,不保存该域的真实值,永远是空,也就是说,你定义了一个显示时计算域,则只能在前台使用,后台(代理等)无法使用这个域。.

http://blog.youkuaiyun.com/chwxj/article/details/6589372



对于LotusScript,除了Rich-Text域外的元素,如文本、单选框、列表框、复选框等,你可以用几乎相同的代码取得它们的值。例如:如果有一个“Location”域,不论它是何种类型,你都可以用下面的LotusScript代码取得它的值:   fieldVals = doc.Location   或者这样:   fieldVals = doc.GetItemValue("Location")   在LotusScript中,域的类型对于你要取值(值数组)的代码并不重要。但是在JavaScript中,不同类型的域除了显示选项(比如单选框、复选框或者文本)外,并不像在Notes里那样,它们是不同的类型的对象,每一个都要用不同的方式去引用。其实,那也不是绝对的,有些对象是相似的,但是引用过程并不像在LotusScript里那么流畅。   在JavaScript中,没有所谓的Rich-Text域,在HTML中更没有。Notes里提供了一个可以放在浏览器里的富文本Java(不是JavaScript)小程序,从而可以得到富文本的一些功能,但是你并不能用JavaScript来对它编程,而且它也不是一个真正的HTML对象类型。   更让Notes开发人员惊讶的是,在Web上还没有数字型或间型的域。HTML的域都是文本型的。尽管你能用它们来收集数字信息,如数量或单价,而保存的数据依然是文本。为了像数字一样使用它,你必须把它转换成数字类型。另一个区别是在Web上没有计算域,但并不意味着你不能在你的表单里加入计算域。你可以加入计算域,计算值将会在Web页中显示,除非域是隐藏的。关键是即使域就在那里显示,而HTML通常的处理是没有定义域。如果你把test域改成计算域而不是可编辑的,在测试你会发现其值是取不到的,我们可以对比下计算域和可编辑域生成的html代码:   计算域的候生成的代码(js是取不到值的):      action="/weboa/ggxx/Dinner.nsf/test?OpenForm&Seq=1" name="_test">
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值