Improve workflow for new control procedures and use program object signature as template comment
When creating a new control procedure and template for a program object, such as a default or a layout, these are the general steps:
create control proc
assign placeholder template to prog_object_item
which creates a template automatically
generate the prog_object
copy the parameters of the program object
paste it in the template.
Write your code and delete the pasted signature.
These are a lot of steps, which imho can be done in one flow after creating your control proc and assignment. It will save a lot of clicks and screen switching.
Page 1 / 1
Hi Dave,
I would like to point out 2 things.
In the 2023.2 we improved the way of editing program object code (see URL for more info). The advantage of using this feature is that you already have access to all parameters, and that the SF ensures that the changes you make are saved in the appropriate templates.
In the upcoming 2024.2, we will add a model enrichment (see URL for more info) that enables you to create application logic based on natural language. You can choose if you want to limit this to 1 table or not. It will add a control procedure and template, assign it to the relevant program object(s), and generate the program object(s) for you.
Would the combination of these 2 features be sufficient in your situation?
Jeroen
The following idea has been merged into this idea: All the votes have been transferred into this idea.
@Jeroen van den Belt
to be clear, with parameters from the signature I meant the parameters of the prog object.
That's how I interpreted it 🙂. For clarity for other users, I changed point 4 in your original text a bit.
What I meant was, if you already have the parameters in the program object code, and you are also able to directly edit the program object code, wouldn't that suffice in your situation? You can easily copy the desired parameters to the code-part below, write your code and then save it. The SF does the rest for you.
@Jeroen van den Belt
To clarify:
My idea is particular of interest in the process of creating a new template and assigning it. (or vice versa)
There are two ways to accomplish that
You follow the order of tabs/screens given in the software factory:
Screen “Control procedures”: Create a new control procedure
Screen “Templates”: Create a new control procedure template. You can’t begin coding yet, for you don’t know the parameters from the signature of the program object yet. You place some dummy code (like a comment) to be able to save the control procedure template, because it’s mandatory.
Screen “Assigning”: Assign the template
Screen “Deploy”: Generate
Copy the signature parameters of the program object.
Screen “Templates”: Open the code and paste the signature parameters
Happy coding!
You don’t follow the order of tabs/screens:
Screen “Control procedures”: Create a new control procedure
Screen “Assigning”: Assign the dummy template. A new control proc template will be generated for you.
Screen “Deploy”: Generate
Copy the signature parameters of the program object.
Screen “Templates”: Open the code and paste the signature parameters
Happy coding!
I suggest a flow a long the lines of this:
Screen “Control procedures” create a new cp.
Offer the option to assign it to a program object
Automatically generate
the program object (for the signature)
the template
put the signature parameters in the template (in comments if you must)
Happy coding
We will go from 6 steps to only 2 steps/clicks/screens.
Alternatively, since you can also code in the program object it self, maybe that should be the second tab page, and leave templates as an advanced option. But as it is now, the order of tabs suggests another workflow and doesn’t reduce the amount of steps.
Needs feedback→Open
Although we also use the copying of the signature into remarks of the control procedure, we were thinking about a slightly different solution. There is a lot of white space on the right side of the editors frame. Wouldn’t it be possible to show the signature of the controle procedure there instead of pasting it into the code. This would then always show the actual signature and there would be no need to copy it at all (unless you want to ofcourse).
@Robert Wijn 2 also a good idea. However, you won’t see the signature then when you open the code file in an SQL editor such as SSMS. I like to have them available in the code it self.
And if you put a declare before it, you can actually use it in the code to let intellisense recognize the parameters.
declare @default_mode tinyint, -- 0 = add, 1 = update @import_mode tinyint, -- 0 = regular, 1 = import row, 3 = import @cursor_from_col_id varchar(255), -- column that triggered the default @cursor_to_col_id varchar(255), --output, -- cursor in column after leaving the default @auto_commit bit, --output, -- 1 = auto commit
The following idea has been merged into this idea: All the votes have been transferred into this idea.
Not sure how this would work if you have multiple assignments in place. My idea was to just show the available parameters (per assigned object on the right) ill leave it up to the development team what the best solution would be :