You are viewing limited content. For full access, please sign in.

Question

Question

Column Layout Inheritance in the Thick Client

asked on February 22, 2016

Hello! I'm trying to programmatically set user attributes to control which columns are displayed to any given user in the thick client. I'm doing this through an SDK script that runs within a workflow.

Defining and setting the attributes is working great for me, using the following code:

'Get the user's name.
Dim username as String = Me.GetTokenValue("RetrieveLaserficheFormsContent_Username")

'Get the IDs of folders used in attributes.
Dim activeOrdersFolderId as String = Me.GetTokenValue("GettheActiveOrdersFolderID_OutputEntry_ID")
Dim archivedOrdersFolderId as String = Me.GetTokenValue("GettheArchivedOrdersFolderID_OutputEntry_ID")

'Define the column layout attibute.
Dim columnLayoutAttributeName as String = "[XmlColumnDisplay]Data"
Dim columnLayoutAttributeValue as String = "<?xml version=""1.0"" encoding=""UTF-8""?> <columndisplay generatedby=""Laserfiche Client 9.2.1.635""> <layouts> <layout id=""5""> <columns> <column ColCode=""N"" SortOrder=""A"" SortPriority=""1"" Type=""System"" Width=""300"" /> <column ColCode=""D"" Type=""System"" Width=""81"" /> </columns> </layout> <layout id=""16""> <columns> <column ColCode=""N"" SortOrder=""A"" SortPriority=""1"" Type=""System"" Width=""292"" /> <column ColCode=""Current Gate"" Field=""Current Gate"" Type=""Field"" Width=""136"" /> <column ColCode=""Zeno Office"" Field=""Zeno Office"" Type=""Field"" Width=""71"" /> <column ColCode=""Sales Rep"" Field=""Sales Rep"" Type=""Field"" Width=""103"" /> <column ColCode=""Amount"" Field=""Amount"" Type=""Field"" Width=""83"" /> <column ColCode=""Lease"" Field=""Lease"" Type=""Field"" Width=""40"" /> <column ColCode=""D"" Type=""System"" Width=""53"" /> </columns> </layout> </layouts> <folders> <folder id=""1"" layoutid=""5"" /> <folder id=""3"" layoutid=""5"" /> <folder id=""1051"" layoutid=""5"" /> <folder id=""18"" layoutid=""5"" /> <folder id=""515"" layoutid=""5"" /> <folder id=""" & activeOrdersFolderId & """ layoutid=""16"" /> <folder id=""39982"" layoutid=""5"" /> <folder id=""40005"" layoutid=""5"" /> <folder id=""" & archivedOrdersFolderId & """ layoutid=""16"" /> <folder id=""520"" layoutid=""5"" /> <folder id=""2774"" layoutid=""5"" /> </folders> </columndisplay>"

'Define the "unique folder columns" attribute.
Dim uniqueFolderColumnsAttributeName as String = "[Settings]UniqueFolderColumns"
Dim uniqueFolderColumnsAttributeValue as String = "Yes"

'Set attributes on the user.
Dim attributes As TrusteeAttributeCollection = Trustee.GetAttributes(New AccountReference(username, Me.RASession), Me.RASession)
attributes(columnLayoutAttributeName) = columnLayoutAttributeValue
attributes(uniqueFolderColumnsAttributeName) = uniqueFolderColumnsAttributeValue
            attributes.Save()

This all works great, except for one minor thing...

Let's say that the XML above sets the column layout on Folder X. And let's also say that Folder X has a bunch of sub-folders inside of it. In this example, when a user browses to one of the sub-folders inside of Folder X, the Laserfiche client automatically modifies the XML within the `[XmlColumnDisplay]Data` attribute, so that the child folders will inherit the parent folder's column layout.

Is there any way to prevent this? In my scenario, the column layout only makes sense for Folder X, not for its children. Thanks!

0 0

Replies

replied on February 22, 2016

The client should be inheriting the parent folder column layout, but it shouldn't modify the XML unless the user actually makes a change. This looks like a bug, we will look into fixing it.

0 0
replied on February 22, 2016

Thanks Robbie! Sounds good.

FWIW: It would be super-duper cool if you could set an attribute to prevent this type inheritance. In my case (and I imagine a good number of other cases), it results in empty columns for the sub-folders.

And sure, users can manually modify the column layout on the sub-folders, but in situations where Workflow is creating the folders (e.g., one folder per order or case or whatever the business process is), it becomes a bit of hassle to manually reset column layouts each time.

Thanks again for the quick reply!

0 0
replied on April 26, 2016 Show version history

This has been addressed in the Laserfiche desktop Client 10.1

0 0
replied on April 26, 2016

Hey Pava! Thanks for the update.

Just to clarify, in the 10.1 thick client, has column inheritance been disabled (from a parent folder to its children)?

Or, is column inheritance still the default behavior, but is the XML of the corresponding Laserfiche attribute no longer being modified?

I hope that question makes sense. Let me know if not.

0 0
replied on April 26, 2016

The default behavior has not changed, the 'remembered for each individual folder' option still defaults to off. The bug was that it was saving a folder's columns even when you didn't modify them.

0 0
replied on April 27, 2016

Gotcha. Thanks guys!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.