Convert N variables to a structure
980
Views
13
Comments
On our RadarOn our Radar
Service Studio

When we create a screen or action some time we create a lot of local variables. It would be cool if we could select all these variables and with right click create a structure with them keeping the data type of each variable.

2016-04-21 20-09-55
J.
 
MVP

Yes,

would be great addition!

2018-10-29 13-00-29
Magda Pereira
Changed the category to
Service Studio

Useful for refactoring as well. Agree

That would be a fantastic adition, like Roman said for refactor purposes would be great

2014-02-07 17-02-43
Vasco Pessanha
Changed the status to
On our RadarOn our radar

Thanks for the idea!

2014-02-07 17-02-43
Vasco Pessanha
Merged this idea with 'Refactor multiple parameters into a structure' (created on 06 Sep 2019 15:18:52 by Daniël Kuhlmann)

It would be nice if I could select multiple parameters on a screen, client, service or server action and convert them into a structure.



This comment was:
- originally posted on idea 'Refactor multiple parameters into a structure' (created on 06 Sep 2019 by Daniël Kuhlmann)
- merged to idea 'Convert N variables to a structure' on 02 Mar 2020 16:47:18 by Vasco Pessanha

Outstanding idea!

J.Ja



This comment was:
- originally posted on idea 'Refactor multiple parameters into a structure' (created on 06 Sep 2019 by Daniël Kuhlmann)
- merged to idea 'Convert N variables to a structure' on 02 Mar 2020 16:47:18 by Vasco Pessanha
2018-10-29 13-00-29
Magda Pereira
Changed the category to
Service Studio


This comment was:
- originally posted on idea 'Refactor multiple parameters into a structure' (created on 06 Sep 2019 by Daniël Kuhlmann)
- merged to idea 'Convert N variables to a structure' on 02 Mar 2020 16:47:18 by Vasco Pessanha

+1!



This comment was:
- originally posted on idea 'Refactor multiple parameters into a structure' (created on 06 Sep 2019 by Daniël Kuhlmann)
- merged to idea 'Convert N variables to a structure' on 02 Mar 2020 16:47:18 by Vasco Pessanha

Very practical! I like this idea Daniël!

+1



This comment was:
- originally posted on idea 'Refactor multiple parameters into a structure' (created on 06 Sep 2019 by Daniël Kuhlmann)
- merged to idea 'Convert N variables to a structure' on 02 Mar 2020 16:47:18 by Vasco Pessanha

You can already copy-paste parameters from an Action to a structure, but still this would automate:

  - Creating an empty structure to be used as input for the Action;

  - Removing current parameters and adding the Structure as input;

  - Refactoring any code that was calling the Action already.


IMO, the real value-add would be a Service Studio warning for Actions with too many parameters. Clicking the warning should allow the developer to select which parameters should be moved to a structure, and follow the above steps.


Selecting which parameters will be moved is important though, since Structure input parameters don't have an easy way to validate Mandatory attributes.



This comment was:
- originally posted on idea 'Refactor multiple parameters into a structure' (created on 06 Sep 2019 by Daniël Kuhlmann)
- merged to idea 'Convert N variables to a structure' on 02 Mar 2020 16:47:18 by Vasco Pessanha
2014-02-07 17-02-43
Vasco Pessanha
Changed the status to
On our RadarOn our radar

Thanks for the idea!



This comment was:
- originally posted on idea 'Refactor multiple parameters into a structure' (created on 06 Sep 2019 by Daniël Kuhlmann)
- merged to idea 'Convert N variables to a structure' on 02 Mar 2020 16:47:18 by Vasco Pessanha