Bug in Else block

When i added if else activity. Then removed the else block by deleting it, it was removed but
a empty box remains there. Then i tried to get the else block again by searching it in activities but there was no else block. So i tried to paste the add column to data table activity in that empty box, it was pasted but didn’t show up and now when i am trying to delete it, it is not getting deleted.

HI @_Fm ,

Better take another if condition and copy the code by taking another if else activity

Also, please check if you have UiPath.system.Activities package is installed in your code, this issue happens due to version issues some times

Yes, i did that. My main purpose was to report this bug so UiPath can become better.

Yes the package is installed in imports, i have checked it. Thanks

You can’t delete it because you’re drilled all the way down to it. You have to be looking at the container activity when you delete something.

If you check the video that i have posted then you can see that add data row activity is not visible in container (If else block here) activity so i cannot delete it.

These kind of things can happen, especially when opening projects in different versions of Studio. As already pointed out, just re-add the If and set it up from scratch. It’s also possible that it got corrupted because you kept trying to delete an activity while focused on it.

Can you try changing this setting, see if it helps?

1 Like

The ELSE block is just a Sequence activity named “Else” like the “Then” block.
image

In case you add an activity other than Sequence in the “else” placeholder it doesn’t show propperly (therefore it is probably a bug of IF activity) but it shows in the outline tree and you can select it from there.

Cheers

1 Like

This screenshot shows it clearly, the Then and the Else should always have a Sequence in them (thats the activity you need, not an ‘else’ activity.

If you have them hidden as per the setting I shows I dont think there is any way to add it.
Can you try adding another activity in the else, it might force the sequence in there, otherwise maybe the setting I showed can do it.

The activity was updated to hide the sequences as they created extra ‘visual noise’ and this is a niche case where without the sequence its getting confusing.

1 Like

Noted! Yes, you just shouldn’t be able to delete those containers, so it is a bug to be fixed.
Thank you for reporting!

For context, this is how bad it can get.

With Studio setting Hide sequences set to No:
image

A “workaround” would be to set the setting to Yes, in which case the sequence was somehow back:
image

The difference between the Yes and No of that setting is in itself kind of opposite to what I’d expect…