Same address

I want to be able to save some time for the user and have then just click on a clickable box if the home address is same as shipping address and have the shipping address fildes fill in automatically from the home address.
I created a field called same address and made it a calculation, and made it a radio button. When they click on that button I like for it to auto fill the shipping address.
How can I get that to work?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

North2AlaskaSenior EngineerCommented:
First, I don't think it will work as you think if the field is a calculation.  Just make it a number and set the default (Auto Enter data of zero).  Next set the field on your layout as a checkbox and assign it to fire a script when checked.

The script should be pretty straight forward
Set Field ( Mailing Address::Street ; Shipping Address::Street )

For each data element you want to move over....
North2AlaskaSenior EngineerCommented:
I should have mentioned you will also need to make a value list.  I typically make a list called Boolean and set as the only value as 1.  You will not really display this, it really is just to allow you to have a check box.

Then in your script you add something like this

Set Field ( YOUR_CHECKBOX ;  not ( YOUR_CHECKBOX ) )

This simply says if your checkbox is 0 set it to 1. If it is one set it to zero.

Now when you check the box it will store the value and continue with the rest of the script.
noadAuthor Commented:

I'm stuck on your first reply I made the it into t number field, I added the auto enter data of zero ( see attached )

I made it into a check box ( see attached )

Assign script ( see attached )

Created Script ( see attached )

can you illustrate how to set it up?
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

North2AlaskaSenior EngineerCommented:
Very rough quick demo file.  Look at the following:

1) addressSame field (Number, default zero)
2) Value list boolean
3) Script
     a) The first line sets the checkbox
     b) next lines assigns the address

Give this a try and see...
noadAuthor Commented:
On way back to station from a fire.
I'll try it out as soon S possible.
Let you know
Thanks for your help.
noadAuthor Commented:

Not sure what I'm doing wrong, but hopefully this will better help explain what I like to do .

When I click on the blue icon I like for it to give the same values from the primary fields into the secondary fields.
North2AlaskaSenior EngineerCommented:
Just have the button run the script.  Remove the first line and then fill out the rest of the fields.  The command should take the form:

Set Field [ Table Occurrence::Field; Table Occurrence::Field ]

So, your script should look something like this, if your TO is called Person:

Set Field [ Person::firstname; Person::firstname2 ]
Set Field [ Person::lastname; Person::lastname2 ]
Set Field [ Person::addressstreet; Person::addressstree2 ]
Set Field [ Person::addresscity; Person::addresscity2 ]
Set Field [ Person::addressstate; Person::addressstate2 ]

and so forth for each field value you want to move.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
noadAuthor Commented:
I'll try it
noadAuthor Commented:

I understand what needs to be done, but I can't seem to be bale to put the second line in.... see below this is what it let' me input.

I can select the Set Field and it let's me pick the (addressstreet ) filed, but then if I try to choose the addressstreet2 it take away the addressstreet.
HOw can I choose them both like you did in your example?
noadAuthor Commented:

I got it!!!
That was fun!

Thank you so much....

Have a awesome weekend!
noadAuthor Commented:

North knows....LOL
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FileMaker Pro

From novice to tech pro — start learning today.