Expression Editor (Python) - suppress ReadyDoc Tree folder

Discussions related to ReadyDoc development.
Post Reply
bue77
Posts: 3
Joined: Fri Mar 08, 2013 12:29 pm

Expression Editor (Python) - suppress ReadyDoc Tree folder

Post 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
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

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

Post 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
Bob Richards, Senior Software Developer, SoftPro
bue77
Posts: 3
Joined: Fri Mar 08, 2013 12:29 pm

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

Post by bue77 »

Thanks for the info, Bob! :)
timothymeyer16
Posts: 37
Joined: Mon Jun 14, 2021 9:47 am

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

Post by timothymeyer16 »

Is it possible for these visibility conditions to be added or removed programmatically, from within the SDK API?
timothymeyer16
Posts: 37
Joined: Mon Jun 14, 2021 9:47 am

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

Post 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);
                    }
                }
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

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

Post by BobRichards »

So did this work OK for you?
Bob Richards, Senior Software Developer, SoftPro
timothymeyer16
Posts: 37
Joined: Mon Jun 14, 2021 9:47 am

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

Post by timothymeyer16 »

It did, thank you for checking in.
Post Reply