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

How to get line number or cell number/cell identification when flow throws error

Hi Mates,

By any chance can we get current cell number or current line when flow throws error ..?

Example: if there is any error during inserting/updating at line 12 or 12th row can we get the this row number or row value to respond to powerApps screen, then users can understand that issue at particular line.

In shortly: when updating excel values in to SQL Table after looping excel connector fields, we need to convert excel field values in to Int(output('compose')) etc.. during conversion if we found some wrong value like string(abc) instead of numeric number, it will Yes throws an error, that error can we capture ....? or at lest line number along with cell value

 

In addition how to get current item line/row number during every loop..?

your help would be really appreciate. 

1 ACCEPTED SOLUTION

Accepted Solutions
rsaikrishna
Community Champion
Community Champion

@kmk

 

I recommend following things:

1. Before the Apply to each, you can initialize a variable varRowNumber of type Integer and set the value to 1.

2. In the Apply to each, at the end increment the value of variable varRowNumber by 1.

3. Every column in the spread sheet is fixed (assumption). So, if any value fails, you can use column C and varRowNumber combination to identify the cell.

 

Handling Exception Information:

Create a Scope action "XYZ" and move your current action into the Scope.

After the Scope action, create a Compose action to capture the exception details from the expressions in the scope XYZ.

In the compose action, place below expression to get exact exception details:

result('XYZ')[0]?['error']?['message']

 

 

Please review above details and let me know if you have any more questions.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted Solution. Marking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

2 REPLIES 2
rsaikrishna
Community Champion
Community Champion

@kmk

 

I recommend following things:

1. Before the Apply to each, you can initialize a variable varRowNumber of type Integer and set the value to 1.

2. In the Apply to each, at the end increment the value of variable varRowNumber by 1.

3. Every column in the spread sheet is fixed (assumption). So, if any value fails, you can use column C and varRowNumber combination to identify the cell.

 

Handling Exception Information:

Create a Scope action "XYZ" and move your current action into the Scope.

After the Scope action, create a Compose action to capture the exception details from the expressions in the scope XYZ.

In the compose action, place below expression to get exact exception details:

result('XYZ')[0]?['error']?['message']

 

 

Please review above details and let me know if you have any more questions.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted Solution. Marking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

Hi @rsaikrishna 

Really thank you very much for your custom resolution, this is what actually i am looking, you saved my time.Really thanks a lot.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,420)