cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Workflow Condition from BODY and not Excel

Hi all,

 

We are dealing with a tricky problem that I hope you can help with. 

 

An MS form triggers a workflow. When a new form is submitted, the data from the form is transferred into an excel file.

 

This process of storing the data in the Excel file is called a POST, the post includes two things a series of HEADERS and a BODY. In this case the headers are not that important but this BODY contains the data that needs to be stored in the Excel file.

 

The BODY is configured using the information from the FORM, see example below:

 

    },

    "body": {

        "Full Name": "Jane Doe",

        "User Number": "M000",

        "Programme of Study": "Dance",

        "School": "Springfield",

        "Disability?": "Yes",

        "Age Group": "16 – 49",

        "Gender at Birth": "Female",

        "Ethnic Group": "Other minority ethnic group",

        "Heart Disease?": "No",

        "Diabetes": "No",

        "Chronic Lung Disease": "No",

        "Chronic Kidney Disease": "No",

        "Obesity": "No",

        "Immunosuppressive Therpay": "No",

        "Recent History of Cancer": "No",

        "Chronic Neuro Conditions": "No",

        "Epilepsy or Seizures": "No",

        "Sickle Cell": "No",

        "Pregnant?": "No",

        "Caring for high risk": "No",

        "Physical assistance required ": "No",

        "Instruction to shield?": "No"

    }

}

 

Having posted the information to the Excel file the flow then starts to make decisions based on the conditions.

 

However, all of the evaluations in the condition branching statements evaluate the BODY of the post and not the spreadsheet. Therefore the evaluations will always fail when data sources/triggers are not set in the BODY.

 

How do we set up the flow to fetch the calculated value of X from Excel, and not the BODY?

 

Thanks a million!

Mila

7 REPLIES 7
Highlighted
Super User
Super User

Re: Workflow Condition from BODY and not Excel

@Mila 

 

What are you trying to achieve? i read your problem but did not get any insight. if you have designed any flow pls share screens, this will help us to give solution.

 

Thanks

Hardesh

Highlighted
Helper I
Helper I

Re: Workflow Condition from BODY and not Excel

Hey @Hardesh15 

 

Here is the flow:

 

When a new form is submitted, the data provide in the form is added to an excel sheet:

 

Mila_0-1600850093800.png

Mila_1-1600850244341.png

Mila_2-1600850273369.png

At that point, we are looking to identify respondents who have flagged they have a disability. Based on responses, the flow is supposed to send an e-mail to department Y as well as the respondent to advise of next steps. 

 

The following step (below) is where the issue lies. The condition looks up a cell (Risk Factor) in a tab on the Excel Spreadsheet where the Form data is housed. Depending on the number in that cell, the flow should send a specific email to department Y. However, all of the evaluations in the condition branching statements evaluate the BODY of the post and not the spreadsheet. Therefore the evaluations will always fail as the Risk Factor is never set in the BODY.

 

body excel.jpg

 

 

 

 

 

Mila_3-1600850862566.png

Mila_4-1600850982975.png

 

Mila_5-1600851050743.png

 

Does this clarify the issue? To date, we have not been able to fix it. 

 

Thanks

Mila

 

Highlighted
Super User
Super User

Re: Workflow Condition from BODY and not Excel

@Mila 

 

When you are adding row in to a table, you did not supply value in Risk Cat and in condition 8 you are using Risk Cat is equal to Low.

I am not getting this. how do you compare value though column is empty? Are you adding something in Risk Cat column?

 

Please elucidate little more where you are facing problem and what you want to achieve?

 

Thanks

Hardesh

 

Highlighted
Helper I
Helper I

Re: Workflow Condition from BODY and not Excel

Hi @Hardesh15 


Risk Category is calculated using a formula, and the cell containing the value output by that formula is in a tab of the Excel spreadsheet. It is the output value from that field which I am looking to retrieve.
 
Thanks
Mila
Highlighted
Super User
Super User

Re: Workflow Condition from BODY and not Excel

@Mila 

When you mentioned Tab. is it a column or a separate sheet?

You are adding rows in excel sheet and risk category is a calculated column in your excel sheet which give you risk category. You want to use this column in condition. Am i right ?

 

Thanks

Hardesh

Highlighted
Helper I
Helper I

Re: Workflow Condition from BODY and not Excel

@Hardesh15 

 

Hi, yes, this is correct. I need actions to take place based on what is in that calculated risk category cell, i.e. if 'Low', then response A takes place. If 'Moderate' then response B takes place and so on. 

 

Thank you, 

Mila

Highlighted
Super User
Super User

Re: Workflow Condition from BODY and not Excel

@Mila 

 

And what are these Response A and Response B etc. ? email ids right? What kind of error are you getting when you executes risk cat condition. i have seen that your condition block 8 is not executing in your ruining instance. Can you Share running flow screen when it executes at condition block 8.

Make this condition true so that it will go to condition 8 block-

Hardesh15_0-1600871649778.png

 

Thanks

Hardesh

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Users online (5,808)