Jump to content

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

Recommended Posts

Posted

I am making numerous buttons. Each button will be next to a field on a layout. Currently I am able to copy the field data with the custom script step called "copy". The functionality is fine with one exception. It requires I specify the field to copy from in the script editor. I would like to have one script that uses optional parameters from the button.

Is this possible?

Posted

You definitely can use one script with different parameters to accomplish things like this. However I think you left out some important information, and that is what it is you are trying to accomplish.

BTW, avoid using the Copy and Paste Script Steps whenever possible. Instead, think about using the Set Field Script Step.

Lee

Posted

I just read up on the benefits of "Set Field". I would rather use "Set Field" if possible now that I know about it. That is really all I am trying to accomplish is taking a value from one field and have it copied in its' entirety to a different field on the same layout. I would like to have a button next to each field that will be copied. I would like to set on each button the parameters of which field to pull from and which field to put it into.

I hope that is enough information because I feel it would be a beast to type the whole scenario.

Say I have field1 and field2 both with a field on a layout. I would like to have a button next to field1. When the button is pressed I would like whatever data is in field one to also be in field2.

Now I will have many more then 2 fields, hence the desire to have the parameters on the buttons that would trigger a single script rather then having a script for every field I would like to copy.

Hope that helps and thanks for your help!

Posted

Rather than me trying to mockup a file to represent what you describe, why not attach a copy of your file to your post.

To do this, follow these simple steps.

Step 1

Find the file on your hard drive, and zip it.

Step 2

Do not use the Quick Reply, BUT instead, choose the More Reply Option

Step 3

Click on Attached Files and this will take you to your hard drive to locate your file that you want to attach and that you previously zipped. Select the file, and then click Attach This File, and then click Add Reply.

If you should have a problem write me a private message.

Lee

Posted

What is the purpose of this? How many target fields are there?

You can create multiple buttons that set a field. Now you can pass in the source field as a parameter to call a script that sets the target field. Use Get ( ScriptParameter ) to grab the passed value.

Your script could be a simple: Set Field [ target; Get ( ScriptParameter ) ], where the parameter would be passed via the button.

That being said, as an alternative, if its just setting the field and not additional steps, you can just use the single Set Field step on the button itself rather than the button call a script.

This topic is 4679 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.