The following diagram shows the sequence of events initiated by the user request to split a folder. In the
BeforeSplitFolder event, the user interaction can be canceled. To verify if the opening module is the
current module please use the property
Project.ScriptExecutionMode.
If you split a document the corresponding folder CSS
XValues starting with
"AC_CSS_" are not copied to the newly created folder whereas document and page CSS are kept. If needed, you can use
the
AfterSplitFolder event to copy them from the folder that was split.
The splitting of a folder is executed only for folders that are on level one.
' Project Script
Private Sub Batch_BeforeSplitFolder(pSrcXFolder As CASCADELib.CscXFolder, ByVal DocumentIndex As Long, bCancel As Boolean)
If pSrcXFolder.Level > 1 Then
bCancel = True
End If
End Sub
Recalculates a sum from a folder field from all child folders for the first original folder and the new second one.
' Project Script
Private Sub Batch_AfterSplitFolder(pFirstXFolder As CASCADELib.CscXFolder, pSecondXFolder As CASCADELib.CscXFolder)
Dim n As Long
Dim nSum As Long
Dim oXFolder As CASCADELib.CscXFolder
' update the first folder from its child folders
For n = 0 To pFirstXFolder.Folders.Count - 1
oXFolder = pFirstXFolder.Folders(n)
If oXFolder.Fields.Exists("Total") Then
nSum = nSum + CLng(oXFolder.Fields.ItemByName("Total").Value)
End If
Next n
If pFirstXFolder.Fields.Exists("Total") Then
pFirstXFolder.Fields.ItemByName("Total").Value = nSum End If
' update the second folder from its child folders
For n = 0 To pSecondXFolder.Folders.Count - 1
oXFolder = pSecondXFolder.Folders(n)
If oXFolder.Fields.Exists("Total") Then
nSum = nSum + CLng(oXFolder.Fields.ItemByName("Total").Value)
End If
Next n
If pSecondXFolder.Fields.Exists("Total") Then
pSecondXFolder.Fields.ItemByName("Total").Value = nSum End If
End Sub
Search results
Search tips
The search returns topics that contain terms you enter. If you type more than one term, an OR is assumed, which returns topics where any of the terms are found. Enclose your search terms in quotes for exact-phrase matching.
The search also uses fuzzy matching to account for partial words (such as install and installs). The results appear in order of relevance, based on how many search terms occur per topic. Exact matches are highlighted.
To refine the search, you can use the following operators:
Type + in front of words that must be included in the search or - in front of words to exclude. (Example: user +shortcut –group finds shortcut and user shortcut, but not group or user group.)
Use * as a wildcard for missing characters. The wildcard can be used anywhere in a search term. (Example: inst* finds installation and instructions.)
Type title: at the beginning of the search phrase to look only for topic titles. (Example: title:configuration finds the topic titled “Changing the software configuration.”)
For multi-term searches, you can specify a priority for terms in your search. Follow the term with ^ and a positive number that indicates the weight given that term. A higher number indicates more weight. (Example: shortcut^10 group gives shortcut 10 times the weight as group.)
To use fuzzy searching to account for misspellings, follow the term with ~ and a positive number for the number of corrections to be made. (Example: port~1 matches fort, post, or potr, and other instances where one correction leads to a match.)
Note that operators cannot be used as search terms: + - * : ~ ^ ' "