如何刷新视图上的 HideWhen 公式

发布于 2025-01-03 19:09:51 字数 1565 浏览 0 评论 0原文

我有启用软删除的数据库,并将这些已删除的文档存储到名为“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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一身软味 2025-01-10 19:09:52

您想要调用

@Command([ 刷新隐藏公式]);

gWk.ViewRefresh之后。
您可以使用 Evaluate 来实现此目的。

You want to call

@Command([ RefreshHideFormulas ]);

after the gWk.ViewRefresh.
You can use Evalute for that.

坏尐絯℡ 2025-01-10 19:09:52

检查“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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文