Answered
Hi
I have a text field "UNIT PRICE" - it is formatted to display a different currency based on the currency selected in combo box "Currency".
When a value is already entered in UNIT PRICE and the user realises they picked the wrong currency and changes it, the format of UNIT PRICE does not change (eg if £ was selected, then $ picked instead - the format remains £XX.XX...)
if (this.getField("Currency").value == "USD $" ){ AFNumber_Format(2, 0, 0, 0,"$", true)}; if (this.getField("Currency").value == "GBP £" ){ AFNumber_Format(2, 0, 0, 0,"£", true)}; if (this.getField("Currency").value == "EUR €" ){ AFNumber_Format(2, 0, 0, 0,"€", true)}; if(event.value == "$0.00") event.value = ''; if(event.value == "£0.00") event.value = ''; if(event.value == "€0.00") event.value = '';
Is there a way to make UNIT PRICE refresh when "Currency" is changed? (I have the same code on another field 'TOTAL PRICE' which, I assume, because of the calculation it performs, it refreshes itself every time I change the combobox option)
Thanks!
PS I'm quite sure this is far from the simplest way to have written this code, forgive my newbie-ness