cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
j_menin
Frequent Visitor

Form sent for approval based on location question in form

Hi,

 

Desperate for help as I continue to scratch my head for a solution here. I have a form which when submitted, should go to an approver based on the answer to the "Employee Location" question. If Hong Kong is chosen, it goes to a certain person for approval. If Singapore is chosen, it goes to someone else. In total I have 5 locations at the moment but cannot code it correctly. Pictured below is what I have as I've attempted to piece together what I've found.

 

j_menin_0-1625644290052.pngj_menin_1-1625644358590.png

 

The full flow eventually is to go as follows:

1. Form submission

2. Define Location for Approval flow

3. Get form attachment/s

4. Send email to approver containing responses and attachment 

5. Approve reject

6. If approve, create item in sharepoint list/add attachment

3 REPLIES 3
gabibalaban
Dual Super User
Dual Super User

@j_menin ,

Can you show us the next part of your flow, especially the part with "Get_file_content_using_path_2" action ?

The error says that your "Get_file_content_using_path_2" action refers to "Parse_Json" action and there can be a possibility that the "Parse_Json" action to be skipped in some circumstances (when the location value from the form is Singapore).

Hope it helps !

Hi @gabibalaban ,

 

Ok so here's the flow after the switch.

 

j_menin_0-1625707507698.png

 

j_menin_1-1625707563302.png

 The expression used for "get file content using path" on both locations is first(body('Parse_JSON'))?['name']

 

Thank you for responding!

@j_menin ,

use:

first(body('Parse_JSON_2'))?['name'] on “get file content using path 2”, Parse JSON is an action on a different way of the Switch action and it will never be executed along with “get file content using path 2”.

 

Hope it helps !

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 (1,722)