Nov 14 2022 10:11 PM
Nov 14 2022 10:11 PM
I am looking at ways to build a platform/simple system where our IT team can list some items they want to get rid of for example laptops, monitors etc, and our internal staff can access this form and see what inventory there is and make a request/reservation for an item in the inventory.
Users should be restricted to reserving/requesting only one item.
On the IT teams end, we'd ideally like an email or some kind of output to show who's reserved/requested what.
Does anyone have any ideas on how I can build this in MS Forms?
Thank you for your help in advance!
Nov 15 2022 01:36 AM
@kc1986 yes this is quite possible and we've done it at my company in the past. If you use Forms on its own all it can do is to log the request, it can't do anything else with it. So...you won't be able to build this with Forms on its own but will also need to use a SharePoint list and some flows in Power Automate to link it all up, check whether the requestor has already submitted a request and send confirmation email of the request/reservation to the requestor and finally send a response when IT have approved or rejected it. I've got a bit of time later today so will put together a simple demo for you.
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)
Nov 15 2022 03:32 AM - edited Nov 15 2022 03:33 AM
Hi @RobElliott, that's fantastic thank you! I didn't think Forms could do it standalone, so was expecting some sort of integration with PowerApps/Power Automate/Sharepoint. I'm new to this and not done much with it so please forgive any silly questions
Looking forward to seeing your demo :)
Dec 04 2022 06:07 AM
HI Kay @kc1986 , very sorry for the delay. The system is shown below:
1. Create your form first. Make sure in the settings that you select only one response per person.
2. Next create a list in SharePoint for the items available and the number of each item in stock (number column, no decimal places). The items must be unique and the text in the title column must match eactly the text in the Form:
3. Next, create an instant cloud flow from blank. Do not use the Forms template in Power Automate, there is an error in it that can cause the flow to fail and Microsoft have never fixed it. YOur trigger will be the Forms when a new response is submitted. Select your form from the dropdown. Then add the Forms get response details action. Select your form again and then click in the Response ID field. The dynamic content box will open in the bottom right of your screen, select Response Id.
4. Next add a Compose action, click in the Inputs field and from the dynamic content box select the question in the form where they select the item they want.
5. Add a SharePoint Get items action, select your site and the list where the inventory and stock count is. then click the advanced options link. We only want to bring back the one item from the list so click in the Filter Query field and type Title eq '' and between the apostrophes select from the dynamic content the outputs of the Item REquested compose action that you did in the previous step.
6. Although we're only bringing back 1 item, because of the get items action you need to add an apply to each and select value from the get items section of the dynamic content box
7. Inside the apply to each add another Compose action and select from the dynamic content box the Stock.
Next add a Condition and click in the left field. Select the outputs of the Stock compose in the previous step. Leave the middle field as is equal to and in the right field type 0. So this condition checks if the stock for the item selected is equal to 0.
8. When you add a condition it will automatically add the green if yes channel and the red if no channel. In the green if yes channel (in other words there is nothing in stock) just add a send an email (v2) action. In the To field click the 2 arrows at the top right of the field and select Responder's Email from the dynamic content box. Enter the subject and the body of the email which will say that the item is out of stock. You can add the title of the item that the responder wanted.
9. In the red if no channel (i.e there is at least 1 of the item in stock) add a SharePoint create item action, select your site and the InventoryRequests list. In the title field select Responder's Email. In the item select the question where they said what they wanted.
10. We now need to subtract 1 from the number of the item in stock. Add a compose action and click in the Inputs field. In the dynamic content box select the Expression tab and add
the following expression sub(outputs('Stock'),1) and click OK.
11. To update the stock level add a SharePoint Update item action. Select the site and list. In the Id field select ID from the get items selection of the dynamic content box. In the stock field select the Outputs of the Subtract1 compose you created in the previous step.
12. Finally add a send an email (v2).
13. So when the form is submitted the flow will run. In this example there was 1 Bose Headset in stock (#2 above) so the request was successful, the request was added to the InventoryRequests list and the responder received the following email.
14. The flow subtracted 1 from the stock level so there are no Bose headsets left in stock:
15. So the next user who requests it will receive the following email.
Come back with any questions about this.
Microsoft Power Automate Community Super User