DIG Posted September 25, 2016 Posted September 25, 2016 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
comment Posted September 25, 2016 Posted September 25, 2016 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.
Steve Martino Posted September 25, 2016 Posted September 25, 2016 (edited) 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, 2016 by Steve Martino
DIG Posted September 27, 2016 Author Posted September 27, 2016 HI Steve I will give this a try, cheers. Hi Comment - I understand your POV but I need this for our company, thanks.
DIG Posted October 2, 2016 Author Posted October 2, 2016 I have been trying to replicate this recommendation, could someone please show me where I am going wrong? Thank you CopyFieldUpload.fmp12
Steve Martino Posted October 2, 2016 Posted October 2, 2016 (edited) Third line of script should read: Set Field [CopyField::b; $VarA] Edited October 2, 2016 by Steve Martino
Recommended Posts
This topic is 2973 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now