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

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

Recommended Posts

Posted

Hello guys,

I have a bunch of buttons that perform different scripts and I would like to organize them within a single script (looks neater to me) so my idea was to pass as a parameter the name of the subscript to perform. Basically the button "create" performs the script "button manager" passing as a parameter "create a new record", the button "delete" performs the script "button manager" passing as a parameter "delete a record" and so on ...

Within "button manager" instead having a bunch of if else if I would like to perform the subscript with the same name of the parameter. is it possible?

something like perform script [Get(ScriptParameter)].

Thanks and have a nice day.

Posted

Even if it was possible to use a script parameter with the Perform Script step, what would you gain. All you have done is added another script and a lots of complexity.

Posted

I don't think heading in the direction of one complex script with parameters is the way to go. I did that at first, and lived to regret it. I makes debugging much more difficult, since a change in the script could affect a broad range of functionality.

How you organize scripts is personal preference. I'm all for modularity, and subscripts. But use them knowingly. Overall, short scripts that are literal are the easiest to come back to months later.

Posted

Hi there, actually this morning I was doing several things at the same time and I lost my point.

Now, I'm reviewing my solution and the point come out again:

I have a portal that shows actions (the actions table has 2 field name and script) I display the name on the button and I would like to perform dynamically the script called like the value stored in script field. Is there a web-compatible way to do that?

My idea was to pass the field value as a parameter to "button manager" and to perform the script I need as a subscript.

This is the reason why I asked if I can perform the subscript called like the parameter I pass to.

Thanks and have a nice day.

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