cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AakashJaiswal
Helper V
Helper V

If error() / If (IsError()) not executing properly

Hi,

I am trying to create an error handler. However, after the execution of the error statement, false statement (when using If(isError) ) is not executing. 

 

 

 

 

If(
    IsError(
        'OneNote(Business)'.CreateSectionInNotebook(OneNoteKey,{name:TaskID_var}); //create one note section
    ),
    UpdateContext({Submitform_error:true}),
    UpdateContext({Submitform_error:false})
)

 

 

 

 

Whether the error exists or not, the code is executing the false condition in all scenarios. After code execution the button highlights the error in the one.note statement but doesn't execute the true condition. Following is the screenshot.

 

Screenshot (445).png

 

P.S: I have already enabled iferror experimental feature in settings

Marking @v-xida-msft @WarrenBelz  @v-monli-msft  @eka24  @PowerAddict @mdevaney  for your help.

 

Aakash

1 ACCEPTED SOLUTION

Accepted Solutions
alrez
Community Support
Community Support

Hi,

 

Looking through this, this appears to be fine. I dont see anything that sticks out to me on what could be causing the issue. Maybe this would be a better question for Microsoft Support since it doesn't appear that the communities knows the answer to this. I will include a link on how to create a ticket if you want to go down that route. Otherwise if any other communities members know what is occurring here, feel free to chime in.

 

If you would like to create a ticket with Microsoft Customer Support here is a link on how to do so: https://docs.microsoft.com/en-us/power-platform/admin/get-help-support

 

Regards,

 

Alex

 

-------

 

Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
alrez
Community Support
Community Support

Hi,

 

Looking through this, this appears to be fine. I dont see anything that sticks out to me on what could be causing the issue. Maybe this would be a better question for Microsoft Support since it doesn't appear that the communities knows the answer to this. I will include a link on how to create a ticket if you want to go down that route. Otherwise if any other communities members know what is occurring here, feel free to chime in.

 

If you would like to create a ticket with Microsoft Customer Support here is a link on how to do so: https://docs.microsoft.com/en-us/power-platform/admin/get-help-support

 

Regards,

 

Alex

 

-------

 

Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Drrickryp
Super User
Super User

Hi @AakashJaiswal 

Could the semicolon at the end of this line be wrong and should be a comma?

If(
    IsError(
        'OneNote(Business)'.CreateSectionInNotebook(OneNoteKey,{name:TaskID_var}); 

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,562)