Jump to content
Salesforce and other SMB Solutions are coming soon. ×

multiple scripts to one button?


bitstomper

Recommended Posts

Hi,

 

Newby here.

Is it possible to assign more than one script to a button.

I have already a script Set Field assigned and want to add another Set Field script.

how do I go about it?

 

thanks,

Taree

Link to comment
Share on other sites

Hi,

 

Newby here.

Is it possible to assign more than one script to a button.

I have already a script Set Field assigned and want to add another Set Field script.

how do I go about it?

 

thanks,

Taree

Hi, Taree!

Creat script with multiple scripts:

Scripts/Scriptmaker/New

Then assign this script to your button.

Link to comment
Share on other sites

thanks for your help, but I am not clear on something:

what is it that I can actually select from: are they scripts, build in functions?

i can see I can select perform script, but what will happen with the Set Field function that is already assigned to the button? Will the perform script not replace that or can you actually select multiple instructions? And if so how can you see what has been assigned in the end?

Link to comment
Share on other sites

First you must creat script with multiple script steps and name it:

Use menu:

Scripts/scripmaker/new

Assign name to your script, let it be My_Script

Then create few steps, for example

 

Set Field[a;1]

Set Field[b;2]

 

Then assign your created script to your button:

Perform Script

Click "Specify", then choose My_Script.

Link to comment
Share on other sites

The action you want to assign to the button is a script. Do this using the Perform Script script step where you select a script. Obviously, you need to create the script first.

 

You are right when you say that this will replace the existing Set Field assigned to the button. Therefore the script will contain two Set Field steps - the one you have and the new one you want.

 

You can always see what has been assigned to a button by double-clicking it when in Layout mode. In this case, you will see that it has been assigned to preform a script and you will see the name of the selected script. To see what that script does, you will need to go back to the ScriptMaker (where you created the script), open the script, and look at the script steps.

Link to comment
Share on other sites

I understand all you said. Thanks for that.

One thing: currently the script is set to: Set Field

with a calculated result (say functiona=blabla)

So is the way to recreate the script:

Set Field[Table;/*field & functiona=blabla*/]

 

Oh Really!

Taree

Link to comment
Share on other sites

Open the button as it exists. Open the Set Field calculation and copy the expression there. Go to ScriptMaker and create a script. Add a Set Field step. Specify a field. Specify the calculation (paste what you have copied).

 

It sounds like you have not yet opened ScriptMaker to see what is there.

Link to comment
Share on other sites

I have that is where I got the examples from.

Thanks for your input.

Is there an explanation why all of the scripts I see in the setup button dialog are not all in scriptmaker?

Link to comment
Share on other sites

Is there an explanation why all of the scripts I see in the setup button dialog are not all in scriptmaker?

Are you referring to script steps? For example Set Field or Go to Layout? If so, the script steps available when you define a button are very similar to those available when creating a script. The ones that are missing e.g. Loop, End Loop, If, ElseIf, EndIf, are those that are not useable as a single step. For example, to use a Loop, you would need an EndLoop and something in between.

 

In contrast to what you have said:

"script [steps] I see in the setup button dialog are not all in scriptmaker"

 

This is actually more correct:

"script [steps] I see in scriptmaker are not all in the setup button dialog"

 

Hope that makes sense.

Link to comment
Share on other sites

I see what you mean.

I guess the clue is in that they are steps or script instructions not scripts by themselves. So in the setup dialog you can create a script with script steps that is linked to the button. In scriptmaker you create an 'external' script that is then linked to the button via a perform script instruction.

 

Thanks for all your help.

Tareesmiley-smile

Link to comment
Share on other sites

Almost.

 

Where you say:

So in the setup dialog you can create a script with script steps that is linked to the button.

 

I would say:

So in the button setup dialog you choose a single script step that is linked to the button.

 

But:

"In scriptmaker you create an 'external' script that is then linked to the button via a perform script instruction."

Correct!

Link to comment
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use