2012-02-07 28 views
3

我有软删除启用数据库,我将这些删除的文档存储到名为'DeletedDocuments'的视图中 我对该视图有一个操作,以永久删除软删除文档... i对行动指出,当视图不含有任何文件如何刷新隐藏当视图上的公式

以下动作要隐藏HideWhen公式是动作条均线的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])... 我该怎么去呢?

+0

我还没有测试过这个,但是如何:调用notesUIWorkspace.ReloadWindow() – 2012-02-07 18:09:58

+0

请参阅我的答案 - 是否检查属性? – 2012-02-08 15:51:30

回答

1

要拨打

@Command([RefreshHideFormulas]);

之后的gWk.ViewRefresh。 您可以使用Evalute

+0

谢谢.... !!! – Bebo 2012-02-08 12:05:02

+0

但你能告诉我如何编写evalute方法,因为@Command在Evaluate方法中不起作用。 – Bebo 2012-02-08 12:28:36

+0

你甚至可以看看“评估”背后的链接吗?有很多代码示例。 – leyrer 2012-02-08 19:23:21

0

选中DeletedDocuments视图中的“为每个文档更改评估操作”视图属性。如果未选中,视图操作的隐藏时间将只在视图打开时评估。