Page 1 of 1

Expression Editor (Python) - suppress ReadyDoc Tree folder

Posted: Thu Jun 09, 2016 4:41 pm
by bue77
Hello, I was curious if you have any documentation on how to write an expression that will suppress a specific folder for all users/all profiles in a specific database.

We (FNF docs team) have a Corporate Document package that every FNF site has installed on a monthly basis. However, some of these sites would like to suppress specific folders within the Corporate doc trees.

I noticed in 4.1, the expression editor is available on each folder -- is the expression to do this somewhat simple to write?

Currently, we are running scripts after every installation to suppress these folders -- and, now the scripts do not function properly because the SQL table structure changed from 4.0 to 4.1 (Davie). The data in the table we used to update via script is now contained in a column in XML format, and our team does not know how to write an update script for XML data.

I thought this expression editor was definitely the best alternative -- because I could probably write it once and never have to touch it again. Any help you could provide would be VERY MUCH appreciated.

Thanks,
Wayne

Re: Expression Editor (Python) - suppress ReadyDoc Tree fold

Posted: Thu Jun 09, 2016 5:42 pm
by BobRichards
You can suppress the visibility of documents and document folders (and therefore all the documents in the folder) by following the information posted in our online Help topics at http://help.softprocorp.com/select/v4.1 ... itions.htm. Note that setting the visibility condition of the top level "Default" folder to False has no effect. You will have to set the visibility of each individual top level document.

If the Python rule you write in the Visibility condition returns False to Select, then it will not appear in the document lists. Note that you cannot affect the visibility of documents in the user's Favorites list, though. You can use any order model properties you wish. The simplest rule you can write is to always disable viewing of a document is:

Code: Select all

return False
To only show a document if the order is a HUD order, you could use this:

Code: Select all

return Order.SettlementType == Order.SettlementType.HUD1

Re: Expression Editor (Python) - suppress ReadyDoc Tree fold

Posted: Mon Jun 13, 2016 7:58 am
by bue77
Thanks for the info, Bob! :)

Re: Expression Editor (Python) - suppress ReadyDoc Tree folder

Posted: Mon Mar 07, 2022 5:42 pm
by timothymeyer16
Is it possible for these visibility conditions to be added or removed programmatically, from within the SDK API?

Re: Expression Editor (Python) - suppress ReadyDoc Tree folder

Posted: Tue Mar 08, 2022 10:15 am
by timothymeyer16
Took me a minute, but I found this:

Code: Select all

foreach (IDocumentTreeInfo treeInfo in docManager.DocumentTrees.OrderBy(x => x.Name))
                {
                    // Isolate only the Document Trees Profiles and add to dictionary
                    if (treeInfo.Classification.ToString() == "65709e27-67d4-4236-b471-a98bc25c03f6")
                    {
                        // Profiles - multiple line
                        IDocumentTree tree = docManager.GetDocumentTree(treeInfo);
                       
                        // Visiblity Condition
                        IDocumentTreeFolder root = tree.Root;
                       ...
                        row2["Value"] = root.VisibilityCondition;
                        DocumentProfiles.Rows.Add(row2);
                    }
                }

Re: Expression Editor (Python) - suppress ReadyDoc Tree folder

Posted: Tue Mar 08, 2022 4:04 pm
by BobRichards
So did this work OK for you?

Re: Expression Editor (Python) - suppress ReadyDoc Tree folder

Posted: Tue Mar 08, 2022 5:15 pm
by timothymeyer16
It did, thank you for checking in.