How can I perform calculation on configurable matrix

  • Profile Image
    Pride-Chem
    Asked on December 15, 2018 at 10:23 PM

    Hi, I will like to request for help in calculating the field text "Amount $" from Configurable Matrix widget.   

    1544929019Capture.PNG

    I have created the Form Calculation widget to compute the sum of all the "Amount $" field text above. However, I am not sure how to go about doing this.

    Secondly, how can I change the width of field text "Amount $" smaller so that it will just fit 7 characters (eg. 1001.10)? Otherwise, it takes up too much space as the expense of the other field text. This results in 

    Lastly, how can I change the height of field text "Purpose" and "Amount $" so that all the field text of the same rows are of the same height?

    Your assistance will be greatly appreciated. 


    Many thanks!

    Jimmy 

  • Profile Image
    Mike_G
    Answered on December 16, 2018 at 01:43 AM

    I would like to apologize — I'm afraid that it is not possible to insert data from another field to the fields in the Configurable List widget. Our widgets require extra scripting and are loaded from external resources which make conditionally filling up the fields in a widget not possible.

    As for adjusting the fields, we can adjust the width of the "Amount" or "Purpose" fields on the Configurable List widget in your form using CSS codes (How-to-Inject-CSS-Codes-to-Widgets). However, may I suggest that instead of using a textarea to represent those fields, please use a textbox instead. By doing so, the height of those fields will be similar to the height of the "Category" drop-down field on the widget.

    You may find this guide helpful in setting up the Configurable List widget in your form — How-to-Set-Up-the-Configurable-List-Widget

    If you have other questions or concerns, please do not hesitate to let us know.

  • Profile Image
    Pride-Chem
    Answered on December 16, 2018 at 03:16 AM

    Thanks Mike for your quick reply. The height issue has been corrected after your advice.

    I will like to clarify that I am not trying to insert data from another field to configurable list widget. I am trying to insert one of the Configurable List field to Form Calculation widget. 

    For the "Amount $," the values in the textbox are manually key by the user instead of inserted from another field. If there are 3 receipts, there will be 3 filled values in "Amount $" textbox. I have limited the number of rows to 5 and therefore, there are maximum of 5 values (receipts) from the "Amount $" textbox. These manually key-in values are used to generate the total value in the widget "Form Calculation." How do I identify each of the textbox for "Amount $" so that I can add them up in "Form Calculation" widget?

    Jimmy

  • Profile Image
    Mike_G
    Answered on December 16, 2018 at 05:55 AM

    Thank you for clarifying your concern.

    Although it is possible to pass the data entered in the Configurable List widget fields using conditions,

    1544957259t05_44.gif

    it's not possible to just get/capture specific field values from the data that was passed.

    What you can use instead is the Input Table field (Matrix Table).

    Calculate-Values-in-the-Input-Table-Through-Condition

  • Profile Image
    Pride-Chem
    Answered on December 16, 2018 at 04:34 PM

    Thanks Mike for your kind assistance. I shall go with the input table as per your suggestion. 


    Jimmy