CA Service Management

 View Only
Expand all | Collapse all

Increase the length of a text field property

Jump to Best Answer
  • 1.  Increase the length of a text field property

    Posted Mar 02, 2016 03:38 PM

    Could anyone suggest me on how to increase the length of a text field property?

    By default it is a short length text field on the properties tab form though the default size that it can accomodate is 240 characters.

    If it's too much of an effort then I would create a text field on the main form rather using a property field.



  • 2.  Re: Increase the length of a text field property
    Best Answer

    Posted Mar 02, 2016 06:04 PM

    Hi Vishnu,

    Unfortunately that is hardcoded currently and cannot be changed from within the product.  For something like this it would be best to create an "idea" here in the communities so folks can vote for it, and product management can review it for possible inclusion in future versions of the product.  

    Thanks,

    Jon I.



  • 3.  Re: Increase the length of a text field property

    Posted Mar 03, 2016 10:18 AM

    As I expected...Thanks Jon. I created this request in Idea and hope this gets considered to be accomodated in the future releases of Service Desk Manager.



  • 4.  Re: Increase the length of a text field property

    Posted Mar 03, 2016 10:26 AM

    I voted for it



  • 5.  Re: Increase the length of a text field property

    Posted Mar 03, 2016 03:46 PM

    I think it is possible to change this, but you will need to change field size on the database level and then create mod file to make changes on object layer. Sometime we do this for the clients, but never done this for properties. Anyway this is regular field of string type so it should work without any problemd



  • 6.  Re: Increase the length of a text field property

    Posted Mar 03, 2016 04:17 PM

    That procedure applies to an object/field that actually exists on both object and DB layers but I wonder how this is applicable for properties...



  • 7.  Re: Increase the length of a text field property

    Posted Mar 04, 2016 01:26 AM

    The properties also exist on both layers, for example cr properties on object layer are defined as cr_prp object, data for this object is stored in Req_Property database table.

     

    Factory cr_prp

    Attributes:

       id                   INTEGER

       producer_id          LOCAL STRING(20)

       persistent_id        STRING(30)

       sequence             INTEGER REQUIRED

       label                STRING(80) REQUIRED

       description          STRING(240)

       value                STRING(240)

       required             INTEGER REQUIRED

       sample               STRING(240)

       owning_cr            SREL -> cr.persistent_id REQUIRED

       last_mod_dt          DATE

       last_mod_by          SREL -> cnt.id TENANCY_UNRESTRICTED

       validation_rule      SREL -> prpval_rule.id

       validation_type      SREL -> prpval_type.id

       value_description    STRING(240)



  • 8.  Re: Increase the length of a text field property

    Posted Mar 07, 2016 01:14 PM

    The text box property field shows up as small text box on the Reqest form though it can hold 240 chars currently. I'm looking into widening the text box length on the form, makes sense?



  • 9.  Re: Increase the length of a text field property

    Posted Mar 07, 2016 03:59 PM

    detail_form.js contains function called detailWriteProperty, there you will find the following lines:

     

    rowData = "<input" + detailNextID(1,false,attr_name) + " TYPE='" + type + "'" +
    " title=\"" + hdrtext + '"' +
    checked + " name=SET.prop" + propNum + ".value " +
    "size=50 " +
    "value=\"" + value.replace(rxQuote,"&quot;") + "\">";
    

     

    Here you need to change size attribute value e.g

    rowData = "<input" + detailNextID(1,false,attr_name) + " TYPE='" + type + "'" +
    " title=\"" + hdrtext + '"' +
    checked + " name=SET.prop" + propNum + ".value " +
    "size=100 " +
    "value=\"" + value.replace(rxQuote,"&quot;") + "\">";
    

     

    Do not forget to clear browser cache or put it to private browsing.



  • 10.  Re: Increase the length of a text field property

    Posted Mar 07, 2016 07:15 PM

    This is perfect. Thank You, Gutis!!



  • 11.  Re: Increase the length of a text field property

    Posted Nov 07, 2017 02:02 PM

    Hello vchinni;

    i tried gutis solution but the property field is not increased, i changed the size value to 100 through the detail_form.js file from Web Screen Painter and saved and published; but the length is still the same.

    am i missing anything here?

    Regards;

    Mohamed El-Fahd



  • 12.  Re: Increase the length of a text field property

    Posted Nov 06, 2017 10:10 AM

    Hi Gutis;

    i tried your step but the property field is not increased, i changed the size value to 100 through the detail_form.js file from Web Screen Painter and saved and published; but the length is still the same.

     

    am i missing anything here?

     

    Regards;

     

    Mohamed El-Fahd



  • 13.  Re: Increase the length of a text field property

    Posted Nov 07, 2017 02:01 PM

    Hi Gutis;
    i tried your step but the property field is not increased, i changed the size value to 100 through the detail_form.js file from Web Screen Painter and saved and published; but the length is still the same.

    am i missing anything here?

    Regards;

    Mohamed El-Fahd



  • 14.  Re: Increase the length of a text field property

    Posted Nov 08, 2017 06:14 AM

    Maybe you made modifiactions for detail_form.js tha is in bopcfg folder, but you also have customized version in site\mods?



  • 15.  Re: Increase the length of a text field property

    Posted Nov 08, 2017 06:19 AM

    Thanks Gutis i just clears the browser cache and it working fine now, one last thing can i make the properties field size  looks like the description field?!!  



  • 16.  Re: Increase the length of a text field property

    Posted Nov 08, 2017 06:29 AM

    hi,

    if I understood your requirements, code below generates input type field but description is textarea. You can try to replace:

    rowData = "<input"

    with:

    rowData = "<textarea"

    textarea have few different flags such as "rows",  to configure input properly, please check these docs:

    https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input

    https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Textarea 

     

    Regards,

    cdtj