5 Replies Latest reply on Mar 9, 2015 7:41 AM by Rizwan

    Clearing values on attribute after using a dynamic window calculation to set read only

    jisidro Apprentice

      Hi All,

       

      I'm using the dynamic window calculation to set read only on selected attribute once an article has been approved.

       

      The issue occurs after I approved an Article, the text and images in the description and Solution disappeared for some reason.

       

      import System

      static def GetAttributeValue(Article):

        Value = false

        if Article.Status.Title == "Approved" or Article.Status.Title == "Rejected":

        Value = true

        return String.Format(":SetReadOnly(Title, {0});:SetReadOnly(_Description, {0});:SetReadOnly(Type,{0});:SetReadOnly(_Category, {0});:SetReadOnly(_KeywordsTags, {0});:SetReadOnly(_Solution, {0});:SetReadOnly(ExpiryDate, {0});:SetReadOnly(KnowledgeDomainCategory, {0});:SetHidden(Effectiveness,False);", Value)

       

      Thanks in Advance.

       

       

      Jonathan