Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 2973 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted (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 by Steve Martino
Posted

HI Steve I will give this a try, cheers. 

Hi Comment - I understand your POV but I need this for our company, thanks.

 

Posted (edited)

Third line of script should read:

Set Field [CopyField::b; $VarA]

Pic.png

Edited by Steve Martino

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.