For some reason the Response action is not able to be duplicated. I would like the option enabled/added.
Do you mean just duplicated so you can cut/paste it elsewhere? If yes, you can do that using the code view when the API is open.
Do you mean you want two Response objects directly underneath each other? What's the use case?
I'm curious about the request and you might have better success including what the challenge is currently without this feature.
I do a lot of branching in my APIs. I know I can edit in code view, but that's not desirable 99% of the time.
See the ELSE statements showing the different Response codes. These are fairly similar, so being able to duplicate them allows for quicker development.
hey keith,
I just saw that and wonder...
Cause I work on 6.1.2 and the respnse dublicate is available
And as a matter of fact I can remember Brian (@Hyperbytes) dublicating responses on his video tutorials ( Wappler 5.0/ 6 Quickstart)
Better memory than me!
The response action is an end action so nothing after it will be executed. That is why it makes no sense to duplicate it and we have prohibit it.
Also you can’t insert other actions behind it.
@George, I branch my APIs. Each branch terminates at the response and wouldn't continue, so it does make sense to be able to duplicate the Response actions, so I can copy and move it to another branch.
I'm running 6.8.0 and there is no option to duplicate the Response action.
It does make perfect sense when working on complex logic or just debugging it, to be able to put response steps in multiple places. Duplicating save a lot of time.
Duplicate was not doing any harm either. Don't see any value at all in removing that option.
Yes that is perfectly fine and you can have as many response steps on different branches in the server action as you wish.
Just duplication of the current selected response step is prohibited as it will create an extra response step behind it that will be never executed.
But as I said on different branches and conditions you can have as many response steps as you want. Just one per branch and nothing else behind it on the same branch.
And that is how duplicating is helpful here.
Instead of having to create another step and fill in the inputs.. I can just duplicate and move it to the right place.
Even if I don't move it, what difference does it make? It won't break anything. So again, does not make sense at all why you would remove the duplicate option.
Removing add item/step option makes sense, since anything added below it will not work, and could lead to unwanted posts in the forum. Duplicating response step on the other hand, not the same thing.
If you just want to copy the action to a different place just use ctrl+drag to drag and copy it.
Tried that, didn't work. Looks like that's disabled as well.
ok, that works for me on Windows.
I still think the UI could be improved to inform users why
duplication is not allowed on the Response action and to use ctrl+drag. Otherwise, others will spend unnecessary time wondering like we are as to why this one action type is not allowing it.
No offense meant here @George but with these kind of design decisions I feel like you're not using Wappler enough to build stuff.
I fully agree with @sid like with many similar topics, and I'm not affiliated with him whatsoever.
What we have in common is that I am working in Wappler whole day every day and I believe so is Sid.
I greatly appreciate what you guys have made as it has been life changing.
However, I really hope you take feedback from heavy users seriously, because as he said: there's no harm done duplicating it. And duplicating it is apparently a natural intuitive way for people to work with actions.
Me and my devs also duplicate response steps all the time, because of the branching others have mentioned.
Similarly with the discussion about not auto adding _copy
after duplicating elements. I get the idea behind it, but in real life this has probably caused me hours of extra work accumulated over the years - just by removing _copy
from variables.
Because the natural flow in this case is to create a branch where you for example want the same variable to be set but depending on the flow you want a different value.
Here's an example I could find within seconds (because it's so frequent in our application), where the same query is there 3 times in total depending on conditions.
Anyway it might seem like I'm going off topic, my point is: please take our feedback to heart and perhaps consider if it's a crazy idea to just go with the the user's preference with these things
That is all perfectly fine and you can all duplicate those steps.
I think you are a bit confused about the duplication of response step - we mean the “response” action not just any step with output…
So we are talking here about the specific “response” action only that ends the flow and red turns a response code
Could you allow duplication but throw a warning, like you do on other actions, informing the user that two sequential responses will not work?
Yes I realize that, this topic is about this:
I'm trying to take a step back and talk about the general design decisions you and the team are making.
As I mentioned, I agree with the others on this topic.
Please consider reading my comment again with this in mind, it's more of general feedback
I use it a lot for debugging and removing the duplicate option is a productivity killer - and I agree that this decision is one made by someone who most likely does not build using Wappler.
The duplicate options is available as always. It is only not available for end steps like “response” or “end” actions as there are no actions executed after those. So we have restricted the adding of actions after those end steps to prevent confusion of people asking why those actions don’t get executed