The business request
The store needs keyboards, monitors, and chairs. Before purchasing, someone reviews the item, quantity, and amount. Your solution must save the request, calculate the total, and retain a human decision.
Aprobada means the request was authorized. It does not mean an order was placed, goods received, or payment made.
1. Design the request register
Create a blank SharePoint list named LAB Solicitudes Compra. Rename Title to Solicitud; internally it will remain Title.
Add these columns with exact names:
| Column | Type | Configuration |
|---|---|---|
| Articulo | Single line of text | Required |
| Quantity | Number | Required; zero decimal places; minimum 1 |
| PrecioUnitario | Currency | Required; EUR; two decimal places; minimum 0.01 |
| Amount | Currency | EUR; two decimal places; filled by the flow |
| Status | Choice | Pendiente, Aprobada, Rechazada, Error; initially Pendiente |
| Resolucion | Multiple lines of text | Plain text |
Create columns without accents or spaces so new internal names match the exercise expressions.
Download the CSV. Do not create requests yet: the flow starts when a new row is created and will not automatically process earlier rows.
2. Start the flow and calculate the amount
In Power Automate, create an automated cloud flow: LAB Barrio Demo Compras.
Choose SharePoint → When an item is created and select your site and list. Using the creation trigger prevents the flow's own updates from restarting the same process.
Add Data Operations → Compose, renamed Calcular_importe. In the expression editor enter:
mul(float(triggerBody()?['Cantidad']), float(triggerBody()?['PrecioUnitario']))
Add Update item using the trigger ID, the original request in the required title field, and the output of Calcular_importe in Amount and Pending in Status. Retain required article, quantity, and price data if the designer requests it.
The currency column displays two decimal places. This calculation suffices for the small dataset; an accounting solution must define rounding, taxes, discounts, and monetary precision before using real amounts.
3. Request a human decision
Add Approvals → Start and wait for an approval.
Configure:
- Type: Approve/Reject — First to respond.
- Title: request code and item name.
- Assigned to: your enabled test account.
- Details: item, quantity, unit price, and the output of Calcular_importe, indicating EUR.
- Item link: the created item's SharePoint link from the trigger's dynamic content.
Choose an account you control to avoid involving others during testing. Saving the flow does not send an approval: creating a request sends it.
4. Record the response
After approval, add a Condition using dynamic content Outcome: equals Approve.
The approval response values are Approve and Reject; the interface display language does not change these values.
In Yes, add Update item with the original ID, Estado = Aprobada and Resolucion = Request approved through the review process. In No, update the same item to Rechazada with Resolucion = Request rejected through the review process.
These phrases describe the process outcome; they are not approver-written comments. Identity, comments, and the original response can be checked in the approval and run. As an extension, explicitly save them from the collection Responses; do not invent a signature or comment.
Repeat required fields in both updates. Save the flow.
5. Test the case purchases
Create requests one at a time using CSV data. Do not copy ImporteEsperado into the field Amount: the flow must calculate it.
| Solicitud | Purchase | Expected total | Test action |
|---|---|---|---|
| COM001 | 12 keyboards at EUR 34.95 | 419,40 € | Approve |
| COM002 | 4 monitors at EUR 169 | 676,00 € | Reject |
| COM003 | 3 chairs at EUR 219 | 657,00 € | Approve |
For each row, first check the request arrives with the correct amount. Resolve it from Approvals and verify that only the corresponding item changes.
Modifying a row afterwards does not start another approval in this design. Do not permit quantity changes during a real review without defining how to invalidate and repeat that review.
6. Review issues and submit
A failed or expired approval is not a business rejection. In this version, review the run and manually mark Error with an explanation if no decision is recorded. Do not use the rejection branch to hide a connector failure.
Submit screenshots of approved COM001 and rejected COM002, calculations for all three amounts, and history linking each run to its list ID. Retain the original approval as additional evidence.
Disable the flow when finished. Delete only the list and requests created for this lab if no longer needed.
The conversation continues here
Questions and experiences
Stuck on a step or found another way? Share what you have tried and help those who come after you.
Read comments or sign in to participate.
Loading comments…
For a question about another topic, start a conversation in the community. Participation and privacy rules.