September 25, 20169 yr Hi All - I have a customers layout with two tabs, one is for the customer address and the other tab has the billing address. I want to have a check box with a label that says "Is Billing address the same as Customer Address?", that when ticked copies data from the customer address fields to information, as an example the CustomerStreetName field would be copied to BillingStreetName field. Could someone give me a basic example of how this might look please? Thanks
September 25, 20169 yr IMHO, if you have a checkbox field indicating that Billing address is the same as Customer address, then you already know that they are the same and there is no need to duplicate the data. On the contrary, the Billing address fields should be validated as empty. Otherwise you may end up with a contradiction, where the checkbox is checked and the data does not match.
September 25, 20169 yr You can use an OnObjectModify script trigger to do the following: If [not isempty(Table::CheckboxField)] //Check box field contains a value, proceed, otherwise exit script Set Variable [$Addr; Value:Customers::CustStreetName] Set Variable [$City; Value:Customers::CustCity] Set Variable [$State; Value:Customers::CustState] Set Variable [$Zip; Value:Customers::CustZip] Set Field [Customer::BillStreet; Value:$Addr] Set Field [Customer::BillCity; Value:$City] Set Field [Customer::BillState; Value:$State] Set Field [Customer::BillZip; Value:$Zip] End If Edit: Note Comment's comment about if the billing address fields already contain a value Edited September 25, 20169 yr by Steve Martino
September 27, 20169 yr Author HI Steve I will give this a try, cheers. Hi Comment - I understand your POV but I need this for our company, thanks.
October 2, 20169 yr Author I have been trying to replicate this recommendation, could someone please show me where I am going wrong? Thank you CopyFieldUpload.fmp12
October 2, 20169 yr Third line of script should read: Set Field [CopyField::b; $VarA] Edited October 2, 20169 yr by Steve Martino
Create an account or sign in to comment