locked
how to force the plus sign (+) before a number RRS feed

  • Question

  • I created a set of number fields of type Decimal. 

    Negative numbers will show the leading Minus sign, such as -5.00 

    In a similar way, I need to make the numbers show the leading Plus sign, such as +5.00 

    I tried the following code : crmForm.new_addition.DataValue = "+" + crmForm.new_addition.DataValue 

    Now i eventually get the following error message : "This control only accepts numbers or null as an input".

    I cannot replace the decimal with text fields 'cause i will be using them in calculation later on. 

    Is there any way to append the Plus sign to the decimal field? 

    Thanks!

    Monday, April 25, 2011 1:09 PM

Answers

  • I can't find a way to do this.  You can change the formatting based on your language in CRM to fit the standard. 

    The only supported way I can think of to do this would be to use an nvarchar (string) field for this purpose.

    The other way more convoluted way would be to create an application you expose on the form through an Iframe that looks like a textbox and would use CRM web services and cross-frame scripting to interact with the form.

     

     


    Jamie Miley
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Monday, April 25, 2011 2:25 PM
    Moderator
  • You could make your decimal fields hidden, and then create varchar fields that simulate decimal types and have a dependency with its corresponding hidden decimal field. It would require some javascript work (validation, OnChange, etc.) but shouldn't be too difficult. Sounds like fun!
    Monday, April 25, 2011 9:56 PM

All replies

  • I can't find a way to do this.  You can change the formatting based on your language in CRM to fit the standard. 

    The only supported way I can think of to do this would be to use an nvarchar (string) field for this purpose.

    The other way more convoluted way would be to create an application you expose on the form through an Iframe that looks like a textbox and would use CRM web services and cross-frame scripting to interact with the form.

     

     


    Jamie Miley
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Monday, April 25, 2011 2:25 PM
    Moderator
  • You could make your decimal fields hidden, and then create varchar fields that simulate decimal types and have a dependency with its corresponding hidden decimal field. It would require some javascript work (validation, OnChange, etc.) but shouldn't be too difficult. Sounds like fun!
    Monday, April 25, 2011 9:56 PM