如何刷新视图上的 HideWhen 公式
我有启用软删除的数据库,并将这些已删除的文档存储到名为“DeletedDocuments”的视图中 我对此视图采取行动,永久删除软删除的文档... 我有一个关于操作的 HideWhen 公式,指出当视图不包含任何文档时,操作应该隐藏,
以下是操作栏的 ma Lotusscript
Function deleteSelectedDocuments As Boolean deleteSelectedDocuments=False Call setObjectVars() Dim documentCollection As NotesDocumentCollection Dim userChoice As Integer On Error Goto errHandler Set documentCollection=gDB.UnprocessedDocuments If documentCollection.Count=0 Then Msgbox "You have not selected any documents. Please choose some to delete em",,"No documents selected" Else userChoice=Msgbox ("Do you want to delete " & Cstr(documentCollection.Count) & " document(s)?",64+100, _ "Please confirm...") If userChoice=6 Then Call documentCollection.RemoveAll(True) Call gWk.ReloadWindow() Call gWk.ViewRefresh End If End If deleteSelectedDocuments=True Exit Function errHandler: Print "Error ***" & Error & " occured on line ***" & Cstr(Erl) & "*** with error number ***" & Cstr(Err) & "*** while attempting to delete selected documents" Msgbox "Error ***" & Error & " occured on line ***" & Cstr(Erl) & "*** with error number ***" & Cstr(Err) & "*** while attempting to delete selected documents" Exit Function End Function
我想在文档被删除后刷新我的视图,并且也想刷新 HideWhen 公式... 我有类似 uiDoc.RefreshHideFormulas 的东西 但 uiDoc 在这里不起作用...... 我也无法在“eveluate”中使用 @Command( [RefreshHideFormulas] ) ... 我该怎么办?
i have soft delete enabled database and i store these deleted documents into a view named 'DeletedDocuments'
i have an action on this view to delete the soft-deleted documents permenantly...
i have a HideWhen formula on the action stating that the action should hide when the view does not contains any documents
following is ma lotusscript for action bar
Function deleteSelectedDocuments As Boolean deleteSelectedDocuments=False Call setObjectVars() Dim documentCollection As NotesDocumentCollection Dim userChoice As Integer On Error Goto errHandler Set documentCollection=gDB.UnprocessedDocuments If documentCollection.Count=0 Then Msgbox "You have not selected any documents. Please choose some to delete em",,"No documents selected" Else userChoice=Msgbox ("Do you want to delete " & Cstr(documentCollection.Count) & " document(s)?",64+100, _ "Please confirm...") If userChoice=6 Then Call documentCollection.RemoveAll(True) Call gWk.ReloadWindow() Call gWk.ViewRefresh End If End If deleteSelectedDocuments=True Exit Function errHandler: Print "Error ***" & Error & " occured on line ***" & Cstr(Erl) & "*** with error number ***" & Cstr(Err) & "*** while attempting to delete selected documents" Msgbox "Error ***" & Error & " occured on line ***" & Cstr(Erl) & "*** with error number ***" & Cstr(Err) & "*** while attempting to delete selected documents" Exit Function End Function
i want to refresh my view once the documents are deleted and want to refresh HideWhen formulas too...
i got something like uiDoc.RefreshHideFormulas
but uiDoc doesnt work here...
nor am i able to use @Command( [RefreshHideFormulas] ) in 'eveluate'...
how do i go about it????
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您想要调用
@Command([ 刷新隐藏公式]);
在
gWk.ViewRefresh
之后。您可以使用 Evaluate 来实现此目的。
You want to call
@Command([ RefreshHideFormulas ]);
after the
gWk.ViewRefresh
.You can use Evalute for that.
检查“DeletedDocuments”视图上的“评估每个文档更改的操作”视图属性。如果未选中,则视图操作的隐藏时间将仅在视图打开时进行评估。
Check the "Evaluate actions for every document change" view property on the DeletedDocuments view. If it's not checked, the Hide-When for the view action will only evaluate when the view is opened.