Clarity

  • 1.  How to add Line Breaks in Default Value of Read-Only String Attribute?

    Posted Mar 19, 2019 01:36 PM

    All - 

     

    I've read through past posts in the Clarity PPM community and wanted to see if this type of request has been resolved yet through the years (last post I read was dated 2014).

     

    I'm hoping to create a String attribute (Project object) that will be read-only and allows for line breaks.  The default value may be updated post-creation but will only apply to future projects (not existing).

     

    Does anyone have information on how to accomplish this, or, is this still not supported in 2019?

     

    Please let me know if further information is required, and thank you in advance for your time and effort.

     

    Matt



  • 2.  Re: How to add Line Breaks in Default Value of Read-Only String Attribute?

    Posted Mar 20, 2019 09:29 AM

    Hi mattguercio ,

     

    For any line break read only string attribute, i mostly use core:set with string data as show below:  

     

    <!-- Use below variable in Xog or direct sql update should work -->
        <core:set var="stringWithLineBreakData"><![CDATA[Hi User,
    This is a message on validation over Project.
    Validation#1:
    Validation#2:
    ]]>
    </core:set>

     

    and you can use this core variable in xogging or in sql update. Let me know if this gives you that desire text message.

     

    Regards,

    Prashank Singh



  • 3.  Re: How to add Line Breaks in Default Value of Read-Only String Attribute?

    Posted Mar 21, 2019 09:39 AM

    Hello Prashank - 

     

    Thank you for this information - very helpful.   Apologies as I'm a newer technical user.

     

    Apart from using XOG as I haven't fully learned this yet, is there somewhere I can use this code and input in the system itself, maybe as a query in an attribute or something similar?   Not quite sure how "direct sql update" would work but I'm all ears!

     

     

    Matt



  • 4.  Re: How to add Line Breaks in Default Value of Read-Only String Attribute?

    Posted Mar 21, 2019 11:44 PM

    You could set it on the Project Template, which will then have it set for future projects. 

     

    For existing projects, then agree with Prshank, then supplied code could be used.  A GEL with XOG update would be required, as 'direct sql update' is not supported.  The once off process could also lock the attribute on existing projects to be read-only, whilst future projects then attribute can be edited.



  • 5.  Re: How to add Line Breaks in Default Value of Read-Only String Attribute?

    Posted Mar 22, 2019 03:20 AM

    Hi mattguercio 

     

    I agree with roland.parrotte for not using direct update unless its very critical as updates are not supported on OOTB objects. Also you can refer to GEL Scripting for any basic knowledge on GEL/XOG.

     

    Regards,

    Prashank Singh