Multiplication result from repeating tables in repeating table - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Multiplication result from repeating tables in repeating table

Last post 08-02-2018 01:03 AM by MaroHamamjyan. 13 replies.
Page 1 of 1 (14 items)
Sort Posts: Previous Next
  • 06-19-2018 05:29 AM

    Multiplication result from repeating tables in repeating table

    Hello, As the subject is confusing, please take a look an a screenshot. I need to get the Amount using this rule: Quantity*Price=Amount. I am using SharePoint form. Is there a way to implement this? Thanks in advance
  • 06-19-2018 07:53 AM In reply to

    Re: Multiplication result from repeating tables in repeating table

    Your screenshot looks right to me - what are you trying to calculate that isn't working? You can also attach a form under the options tab.
    Hilary Stoupa

  • 06-19-2018 10:12 PM In reply to

    Re: Multiplication result from repeating tables in repeating table

    HI Hilary, I am trying to get Quantity * Price . I am trying to get Amount (in the screen shot I filled the Amount manually). The problem is that Quantity is one repeating table, Price is another repeating table, Amount is the other repeating table.
  • 06-20-2018 09:24 AM In reply to

    Re: Multiplication result from repeating tables in repeating table

    What are the data types of these repeating fields in the list? I'm confused about the structure of this. I would think you would instead want to set these columns to just be numbers, and then you could have the form manage multiple items. There isn't going to be an easy way to know which qty should be multiplied by which amount.....
    Hilary Stoupa

  • 06-20-2018 10:19 PM In reply to

    Re: Multiplication result from repeating tables in repeating table

    Hi Hilary, Thanks for your reply. The repeating fields are strings, but I assume they must be numbers. Let's consider I made numbers, how can I get the amount from quantity and price? I was thinking to use the eval function to get the values of price repeating table like this:100;200; and the quantity repeating table like this: 1;2; and then in some way get 100*1;200*2 in Amount, but this is not easy indeed. What ideas do you have? Can you please send me a sample? thanks in advance
  • 06-21-2018 08:01 AM In reply to

    Re: Multiplication result from repeating tables in repeating table

    When I look at your form's schema, I see the attached - these are multi-selects. You aren't going to be able to associate a given qty w/ a given price in this structure. You need to change your list.
    Hilary Stoupa

  • 06-21-2018 10:04 PM In reply to

    Re: Multiplication result from repeating tables in repeating table

    Hi Hilary, Can you please let me know to what change my list? number of rows of quantity cannot be defined in some way and the price too, that why I thought I need to use repeating table, and as amount is going to be get from quantity and price- the number rows of amount cannot be defined too. If you were me, what would you do?
  • 06-22-2018 08:05 AM In reply to

    Re: Multiplication result from repeating tables in repeating table

    I would change all the multi-selects to regular string or number data types. Then I'd start the form design from InfoPath designer, and use the "manage multiple items" option so you can create multiple rows in your list from one form. If there were pieces of data that are consistent across all the list items created in a single form, I'd use conditional formatting to display that only once.
    Hilary Stoupa

  • 07-02-2018 05:14 AM In reply to

    Re: Multiplication result from repeating tables in repeating table

    Hi Hilary, Thanks for your idea! I have never tried "manage multiple items" option, so it is a good reason to use it. Thanks again
  • 08-02-2018 01:02 AM In reply to

    Re: Multiplication result from repeating tables in repeating table

    HI Hilary, I have thought to solve my problem using the eval function (I attach the template). When the Quantity was 10 and the price was 20, I was able to get 10*20+ using that function, but then when adding more values to the quantity(5) and price(2) the formula worked like this 10*5*20+2+ I will attach the screenshots. I thought maybe you know a way for getting the formula like this 10*20+5*2 Thanks in advance
  • 08-02-2018 01:03 AM In reply to

    Re: Multiplication result from repeating tables in repeating table

    The first case
  • 08-02-2018 01:04 AM In reply to

    Re: Multiplication result from repeating tables in repeating table

    Screenshot 1
  • 08-02-2018 01:05 AM In reply to

    Re: Multiplication result from repeating tables in repeating table

    Screenshot 2
  • 08-02-2018 08:44 AM In reply to

    Re: Multiplication result from repeating tables in repeating table

    Again, I simply don't believe there is a good approach using the structure you currently have in place, with each field inside its own repeating section. That said, part of your issue may be that you are setting the field on it's own change - which is rarely a good approach. You should probably put your rule somewhere other than on the target field - maybe on a button for testing - or use a default value for the field instead of a rule.
    Hilary Stoupa

Page 1 of 1 (14 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.