Hello Randy,
Another question for my Shipping app. I would like to multiply the value field times the quantity field to come up with an extended total for each line item that is entered. The Default property of my Total text input control is "$" & Text("0.00") which clearly only affects the way the number looks. How do I add a math component to it? More screenshots are attached in the Word doc. Thanks in advance for your help. Teresa
Solved! Go to Solution.
I'm a little confused on the question. You mention the calculation but your doc seems more focused on the Total at the bottom. Perhaps there are two questions here.
So, if you want the Total to be based on the Value and the Qty, then typically you would NOT have a TextInput control for your Total, you would do what you mention...base total on Value * Qty.
So your Label (not textinput) would have a text property of
Text(Value(yourValueInput.Text) * Value(yourQtyInput.Text), "$#,##0.00")
There is no need to put this in your collection.
I would extend this to your Gallery as well. With the Total label having the same formula (except relating to the labels in the Gallery row instead of the TextInput controls).
Finally, your Total label at the bottom can be:
Text(Sum(yourGallery.AllItems, Value(yourTotalLabel.Text)), "$#,##0.00")
I hope this is helpful for you.
Personally, I would skip the collection as your source of total values and instead make your Total label be based on the Gallery.
Your
Text(Sum(yourGallery, TotalAmount
I'm a little confused on the question. You mention the calculation but your doc seems more focused on the Total at the bottom. Perhaps there are two questions here.
So, if you want the Total to be based on the Value and the Qty, then typically you would NOT have a TextInput control for your Total, you would do what you mention...base total on Value * Qty.
So your Label (not textinput) would have a text property of
Text(Value(yourValueInput.Text) * Value(yourQtyInput.Text), "$#,##0.00")
There is no need to put this in your collection.
I would extend this to your Gallery as well. With the Total label having the same formula (except relating to the labels in the Gallery row instead of the TextInput controls).
Finally, your Total label at the bottom can be:
Text(Sum(yourGallery.AllItems, Value(yourTotalLabel.Text)), "$#,##0.00")
I hope this is helpful for you.
Personally, I would skip the collection as your source of total values and instead make your Total label be based on the Gallery.
Your
Text(Sum(yourGallery, TotalAmount