Add 3 different field and display in a read only field

rss

Posted by coresoul - Mar 10 ’15 at 03:55

i want to Add 3 different number field and display in a read only field. How can i achieve that?

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 8 years 10 months 17 days
    #1 by Dmitry Kozlov Mar 11 ’15 at 04:14

    Hi,

    You can create a calculated column and concatinate these numbers:

    https://msdn.microsoft.com/en-us/library/office/bb862071(v=office.14).aspx

  • coresoul
    Member
    Member for: 7 years 5 months 13 days
    #2 by coresoul Mar 11 ’15 at 08:04

    [#1]: is this going to calculate while you are on the form or calculate only after the form is saved? i need a solution where these numbers are added as user input the numbers. please help

  • coresoul
    Member
    Member for: 7 years 5 months 13 days
    #3 by coresoul Mar 11 ’15 at 10:32

    [#1]:

    function updateSum() {

    var a = parseFloat(fd.field('Capital').control().value());

    var b = parseFloat(fd.field('Expense').control().value());

    fd.field('Total_x0020_Investment_x0020_to_').control()._el().html(a + b);

    }

     

    // updates calculated field value when value of field A is changed.

    fd.field('Capital').control().change(function() {

    updateSum();

    });

     

    // updates calculated field value when value of field B is changed.

    fd.field('Expense').control().change(function() {

    updateSum();

    });

     

     

    This worked for me. but how do i put initial value 0 to the Total_x0020_Investment_x0020_to_ field.

    I want to add '$' sign infront of sum.

    if capital and expense is empty i want to show $0 in Total_x0020_Investment_x0020_to_

    if user input number like 100,000, i would like to ignore comma (,)

  • coresoul
    Member
    Member for: 7 years 5 months 13 days
    #4 by coresoul Mar 12 ’15 at 11:27

    [#3]: never mind i did this myself. thanks

Displaying 1 to 4 of 4 messages