Shortcut elements not "connecting"

I have a frustrating problem on both my iPhone and iPad. Both run iOS 12.1.4.

I’m trying to modify the Block Events workflow from Episode 1. The original workflow has three options in the “Choose from Menu” element. I added a fourth one without any problem. Each choice has an Adjust Date element, which I could add to the that choice without a problem. But when I drag in an “Add New Event” element, it “breaks” the flow and won’t “latch” to the workflow. Instead, it is “hanging” around and when running the shortcut, it throws an error. Is there a way to make that connection? Dragging and trying to drop it on the “Adjust Date” element does not connect the two.
Here’s an image illustrating the problem:

Obviously, I can rewrite the workflow from scratch, but Shortcuts should really be able to handle something this simple.

Any thoughts how to repair this workflow?

Thanks in advance for your help.

There’s no need to repair. This is because the Add New Event action does not accept an input. So, it will not link no matter what. If you need the use the adjusted date as the date of the event, you will need to put the result of the Adjust Date action into the Date field of Add New Event.

Thank you, supermamon, for the feedback.

Unfortunately, it does not help at all. Here are two screenshots:

  1. From the original script before trying to alter it - that one works.

  2. When dragging in the element into the next option and adjusting all values - that one still has the flow broken.

The only difference between the two is that one snaps into the flow and the other one hangs around.

Looks to me it’s a visual bug (the one with the link). But it really doesn’t matter since Add New Event does not accept any input so it doesn’t make sense for it to have a link.

My question is, does it create the event whether or not the link is there?

No it does not. It creates it in the one that has the link between Adjust Date and Add New Event, but not for the one with the broken link. It complains about an invalid end date. It looks like Adjust Date is not passed through to Add New Event, even although it’s the same logic as the other, working strand and it’s defined as a date, as it should. Even inserting a “Set Variable” after Adjust Date and then trying to use that variable in the “Add New Event” block for the end time does not work. It only works if I hard-code the end date, e.g. 03/20/2019 (and even in that case the visual link between the two blocks is not there, so that’s a visual bug as you correctly surmised).

A debugger would be really helpful…

Ok, I got it to work. I looked at the magic variables and figured it out. All 4 branches follow the same logic, but for the original 3, the output of “Adjust Time” was assigned to a variable called EndTime (I cannot figure out where that is done). In the new branch, it created a magic variable called Adjusted Date (again, no clue why it did that). Once I used it in the End Date field, it worked.

I miss the old days, when you could use ancient constructs like “set x = 1” or “integer x; x=1;”. It’s not sexy, but when you need to check out a shortcut later, you can actually understand what this thing does. David is right in his Shortcuts course that using the old “Set Variable” and “Get Variable” scheme makes a shortcut more maintainable.

Thanks, supermamon, for your help!

When you use the previous variable as a parameter in an action, even where the action takes no input, the shortcut will show that is is now feeding in by adding the connector line. It isn’t a visual bug… though Shortcuts is definitely not without such things!

To set the name of a magic variable, when you select it in its place of use there is a rename option.

Hope that helps.

Thanks a bunch, sylumer, for the tip!

I see what you mean. If you use the previous variable into the next action, the connector line will appear. I managed to replicate that behavior. Cheers!