Skip to main content Link Search Menu Expand Document (external link)

Correction Dropdown

Table of Contents

  1. Purpose
  2. Flow Diagram
  3. Connections, Triggers, and Actions Used

Purpose

This flow is an automated process that runs after an HTTP POST request is recieved. This flow is primarily called when the document controller opens the link to the correction form. Depending on what is included in the POST request, this API will do something different. If getContract: true is recieved, then the API will respond with the folder names in the submission folder, regardless of anything else.

If getContract: false is recieved, then getSubcontractors is searched. If getSubcontractors is not null, then it contains a contract number. The flow will retrieve all JSON files inside that contract folder and return that directly.

This flow was created to implement the dropdown feature in the correction form, so document controllers can select existing submissions. This cuts down on the potential for misspelling, since we can verify the files that are returned through this API.

Given the following information, the **directory’s** contents are returned.

getContract: true
getSubcontractors: {Any}


+-- ..
|-- (root)
|-- **submissions**
|   |-- R-33333 (ContractNum)
|   |   |-- JSON
|   |   |   |-- R-33333.json
|   |   |   |-- Subcontractor1.json
|   |   |   |-- Subcontractor2.json
|   |-- A-12345 (ContractNum)
|   |   |-- JSON
|   |   |   |-- R-33333.json
|   |   |   |-- Kangaroo.json
|   |   |   |-- Subcontractor1.json
getContract: false
getSubcontractors: R-3333


+-- ..
|-- (root)
|-- submissions
|   |-- R-33333 (ContractNum)
|   |   |-- **JSON**
|   |   |   |-- R-33333.json
|   |   |   |-- Subcontractor1.json
|   |   |   |-- Subcontractor2.json
|   |-- A-12345 (ContractNum)
|   |   |-- JSON
|   |   |   |-- R-33333.json
|   |   |   |-- Kangaroo.json
|   |   |   |-- Subcontractor1.json

Flow Diagram

Power Automate Flow for Subcontractor Autofill API

Connections, Triggers, and Actions Used

Trigger: When HTTP Request is recieved

ConnectorAction
VariableInitialize Variable
Data OperationParse JSON
Compose
SharePointGet File Content Using Path
Create File
ControlApply to each
Condition
HTTPS callWhen a HTTP request is recieved
Response
OutlookSend an Email (V2)


Copyright © 2022 TCIG.