This content has been marked as final. Show 3 replies
You can very well use a value list for the selection method, but you need a bit more logic to fill inn the selected address in you delivery address.Make your value list with the values Home and Office.assign this value list to a text field, n the example I have named it Choose_del_addrAssuming the delivery address is a text field, set up an Auto Enter calculation under Options for that field.Set you calculation up like this:If ( Choose_del_addr="Home" ; Home address ; Office address)Press ok and uncheck the mark at "Do not replace existing value of field"Repeat as necessary for the other address fields.That should do it.
Sometimes we should fill in delivery address in the delivery table (layout) manually.
So, shuld I use in this calculation IF or CASE operator. Or it doesn't matter?
Yes, you can enter data manually, thereby overriding the calculated results as long as you are using a text field with Auto Enter and not a calculation field.If you after entering manual data choose the other option form the popup, your manual data will be overwritten by the calculation.(Because we unchecked the "Do not replace existing value of field" button in the Auto Enter options. Check this button to preserve already entered content.)
Using IF or CASE is mostly a matter of preference.I mostly use CASE statements, but many find IF easier to understand at first glance for the simpler statements. For complex nested statements, IF gets unwieldy and I would recommend sticking with CASE.