Copy link to clipboard
Copied
I'm using a combo box to select different tiers of shipping methods, the export value is the cost of shipping and being populated in a text box. The text boxes Sub_Total, Shipping, and Total_Tax are summed up on the Total line. When one shipping tier is selected the script below works as it should, showing the correct export value in the shipping box. However, if a different tier of shipping is selected the total line does not update with the new shipping cost. I'm not sure how to fix the issue, any help would be appreciated.
var Shipping=this.getField("Combo Box0").value;
event.value=Shipping;
Copy link to clipboard
Copied
If the export value is set for that option, then it should update. Make sure you tick the check-box to commit the selected value immediately, though, under the drop-down's Properties, Options tab, or you would have to exit the field for the selection to "take hold" and the calculation script to execute.
Copy link to clipboard
Copied
Thank you. I believe I found the issue. I had to remove the auto calculation on the Total line and reorder the calculation to get the shipping total to update. Weird issue. Thank you for your help!
Copy link to clipboard
Copied
The issue is the fields calculation order. When you removed the calculation and re-applied it it placed the total field at the bottom of the list, where it should have been.
Copy link to clipboard
Copied
Thank you for pointing that out, in my haste I missed that step.
Copy link to clipboard
Copied
@try67 I have three options for the combo box that require quoting shipping costs. I have the export values of each of the three, quote, next day am, next day pm set to "$". However, when I enter the quoted amount on the text line for shipping it reverts back to the "$". How can I change this to allow a manual entry in the shipping cost line to override the export value on the combo box? Is there a way to incorporate that into the javascript I've used in the text line?
var Shipping=this.getField("Combo Box0").value;
event.value=Shipping;
Copy link to clipboard
Copied
Use this:
if (event.source && event.source.name=="Combo Box0") {
event.value=this.getField("Combo Box0").value;
}
Copy link to clipboard
Copied
@try67 that works!! Thank you!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now