Unexpected error with if else if slese too many

I am using tooooo many if and else in code . Using Reframework in Process flow.
When i trying to open the work flow encounter the error.

Unexpected end of file has occurred. The following elements are not closed: x:Boolean, scg:Dictionary, sap:WorkflowViewStateService.ViewState, If, Sequence, If.Else, If, If.Then, If, Sequence, Sequence, If.Then, If, Sequence, If.Then, If, Sequence, If.Then, If, If.Else, If, If.Then, If, If.Else, If, If.Else, If, If.Then, If, Sequence, If.Then, If, Sequence, Sequence, TryCatch.Try, TryCatch, Sequence, Activity. Line 19507, position 105. Row: 19507, Column: 105

@sanjay You Shouldn’t use too many nested if Statements, You’ll need to try to Separate the Nested if to Separate Smaller Nested if Statements based on the Functionality used. Use a Boolean Variable, instead of continuing the if Statements, you can make a decision based on the boolean variable.

1 Like

yes, I know. This is already messed up. Can you please let me how to resolve this. I am not able to open process flow.

@sanjay So you cannot open the Workflow right?

Yes, I am able to open individual workflow. But the process flow, which have all if else logic and workflow calls.

I am using too many If and else in logic with Reframework Process flow.
When i trying to open the workflow. Uipath studio gives error as : -
Unexpected end of file has occurred. The following elements are not closed: x:Boolean, scg:Dictionary, sap:WorkflowViewStateService.ViewState, If, Sequence, If.Else, If, If.Then, If, Sequence, Sequence, If.Then, If, Sequence, If.Then, If, Sequence, If.Then, If, If.Else, If, If.Then, If, If.Else, If, If.Else, If, If.Then, If, Sequence, If.Then, If, Sequence, Sequence, TryCatch.Try, TryCatch, Sequence, Activity. Line 19507, position 105. Row: 19507, Column: 105

@sanjay Can you provide the Project file?

Is there any limit of Nested if in Uipath Studio???.. Any one from Uipath Team.

@sanjay I don’t actually know, but I do know that using too many nested if Conditions is not recommended :sweat_smile: , I guess @loginerror might be able to help you with that information

1 Like

Hi @sanjay

Could you maybe share the problematic file via a private message?

Hi Is there any nested if condition limit in uipath studio.

I don’t think so, but it would help if you could show us a sample project.

Maybe you could create a new, empty project, and try to re-create the scenario until it throws this error, and then share it with us? :slight_smile:

2 Likes