• Resolved Graicifyd

    (@graicifyd)


    I am trying to add up the values of multiple fields together so that the final output is a range (x-y).

    I have used this function:

    (function(){
    var a = fieldname1.split('-'), b = fieldname2.split('-');
    return CONCATENATE(SUM(a[0].trim(),b[0].trim()),'-',SUM(a[1].trim(),b[1].trim()));
    })()
    
    (function(){
    var a = fieldname49.split('-'), b = fieldname50.split('-'), c = fieldname50.split('-'), d = fieldname50.split('-'), e = fieldname50.split('-'), f = fieldname50.split('-'), b = fieldname50.split('-');
    return CONCATENATE(SUM(a[0].trim(),b[0].trim(), c[0].trim(), d[0].trim(), e[0].trim(), f[0].trim()),'-',SUM(a[1].trim(),b[1].trim(), c[0].trim(), d[0].trim(), e[0].trim(), f[0].trim()));
    })()

    but it’s yielding no result.

    Is there anything I am missing? Please help me check.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @graicifyd

    I’m giving you the tools and teach you to use the plugin, but I cannot implement your project, or debug your code.

    If you check the equation:

    1. The fieldname50 is a DIV field in your form and not a dropdown, a DIV field has no associated a value.

    2. You are not defining the d variable, you are trying to define the variable b twice generating a javascript error.

    As I said in another ticket, the support service does not include the implementation of the users’ projects. If you need additional support like this, you should contact us through our private website: Customization

    Best regards.

    Thread Starter Graicifyd

    (@graicifyd)

    Thank you for your support.

    • This reply was modified 4 years, 10 months ago by Graicifyd.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘CONCATENATE multiple fields’ is closed to new replies.